Extensions for System.Int16, System.UInt16, System.Int32, System.UInt32, System.Int64 and System.UInt64.
More...
|
static short | Clamp (this short value, short min, short max) |
| Clamps the specified short between a minimum and maximum value. More...
|
|
static ushort | Clamp (this ushort value, ushort min, ushort max) |
| Clamps the specified unsigned short between a minimum and maximum value. More...
|
|
static int | Clamp (this int value, int min, int max) |
| Clamps the specified integer between a minimum and maximum value. More...
|
|
static uint | Clamp (this uint value, uint min, uint max) |
| Clamps the specified unsigned integer between a minimum and maximum value. More...
|
|
static long | Clamp (this long value, long min, long max) |
| Clamps the specified 64-bit integer between a minimum and maximum value. More...
|
|
static ulong | Clamp (this ulong value, ulong min, ulong max) |
| Clamps the specified 64-bit unsigned integer between a minimum and maximum value. More...
|
|
Extensions for System.Int16, System.UInt16, System.Int32, System.UInt32, System.Int64 and System.UInt64.
static short TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this short |
value, |
|
|
short |
min, |
|
|
short |
max |
|
) |
| |
|
static |
Clamps the specified short between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified short is below this value, then this will be returned. |
max | If the specified short is above this value, then this will be returned. |
- Returns
- The clamped value of the short.
43 return Helpers.Math.Clamp(value, min, max);
static ushort TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this ushort |
value, |
|
|
ushort |
min, |
|
|
ushort |
max |
|
) |
| |
|
static |
Clamps the specified unsigned short between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified unsigned short is below this value, then this will be returned. |
max | If the specified unsigned short is above this value, then this will be returned. |
- Returns
- The clamped value of the unsigned short.
55 return Helpers.Math.Clamp(value, min, max);
static int TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this int |
value, |
|
|
int |
min, |
|
|
int |
max |
|
) |
| |
|
static |
Clamps the specified integer between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified integer is below this value, then this will be returned. |
max | If the specified integer is above this value, then this will be returned. |
- Returns
- The clamped value of the integer.
67 return Helpers.Math.Clamp(value, min, max);
static uint TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this uint |
value, |
|
|
uint |
min, |
|
|
uint |
max |
|
) |
| |
|
static |
Clamps the specified unsigned integer between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified unsigned integer is below this value, then this will be returned. |
max | If the specified unsigned integer is above this value, then this will be returned. |
- Returns
- The clamped value of the unsigned integer.
79 return Helpers.Math.Clamp(value, min, max);
static long TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this long |
value, |
|
|
long |
min, |
|
|
long |
max |
|
) |
| |
|
static |
Clamps the specified 64-bit integer between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified 64-bit integer is below this value, then this will be returned. |
max | If the specified 64-bit integer is above this value, then this will be returned. |
- Returns
- The clamped value of the 64-bit integer.
91 return Helpers.Math.Clamp(value, min, max);
static ulong TriDevs.TriEngine.Extensions.IntegerExtensions.Clamp |
( |
this ulong |
value, |
|
|
ulong |
min, |
|
|
ulong |
max |
|
) |
| |
|
static |
Clamps the specified 64-bit unsigned integer between a minimum and maximum value.
- Parameters
-
value | Value to clamp. |
min | If the specified 64-bit unsigned integer is below this value, then this will be returned. |
max | If the specified 64-bit unsigned integer is above this value, then this will be returned. |
- Returns
- The clamped value of the 64-bit unsigned integer.
103 return Helpers.Math.Clamp(value, min, max);
The documentation for this class was generated from the following file: