NamespaceSystemLibrary.Common.Framework.Extensions SystemLibrary.Common.Framework.Net.dll
IntExtensions
public static class IntExtensions
Inheritance
object
IntExtensions
Examples
Arguments
X
Methods
Returns the value clamped between the specified min and max.
public static int Clamp(this int value, int min = 0, int max = 9999)
X
var number = -1.Clamp();
// Number is now 0 as Clamp by default clamps between 0 and 9999
X
Methods arguments
Type | Name | Description |
---|---|---|
int | value | |
int | min | |
int | max |
X
Type | Description |
---|---|
int |
}