Add all missing docs
This commit is contained in:
@@ -50,12 +50,18 @@ public static class NumericHelpers
|
||||
return result > short.MaxValue ? short.MaxValue : (short)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values. If this overflows, returns <see cref="uint.MaxValue"/>.
|
||||
/// </summary>
|
||||
public static uint MultiplyOrMax(this uint value, uint multiplier)
|
||||
{
|
||||
var result = (ulong)value * multiplier;
|
||||
return result > uint.MaxValue ? uint.MaxValue : (uint)result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values. If this overflows, returns <see cref="uint.MaxValue"/>.
|
||||
/// </summary>
|
||||
public static uint MultiplyOrMax(this uint value, float multiplier)
|
||||
{
|
||||
var result = value * multiplier;
|
||||
|
||||
Reference in New Issue
Block a user