Method | Description | |
---|---|---|
Between ( int val, int min, int max ) : bool |
Returns true if val is between min and max (incl).
|
|
Clamp ( float min, float max, float val ) : float |
Returns min, if val is lower than min, max, if val is greater than max, or simply val.
|
|
Clamp ( int min, int max, int val ) : int |
Returns min, if val is lower than min, max, if val is greater than max, or simply val.
|
|
Clamp ( long min, long max, long val ) : long |
Returns min, if val is lower than min, max, if val is greater than max, or simply val.
|
|
MultiplyChecked ( int initialValue, double multiplicator ) : int |
Multiplies initial value with multiplicator, returns either the result or Min/MaxValue if the multiplication caused an overflow.
|
|
MultiplyChecked ( long initialValue, double multiplicator ) : long |
Multiplies initial value with multiplicator, returns either the result or Min/MaxValue if the multiplication caused an overflow.
|
|
MultiplyChecked ( short initialValue, double multiplicator ) : short |
Multiplies initial value with multiplicator, returns either the result or Min/MaxValue if the multiplication caused an overflow.
|
public static Between ( int val, int min, int max ) : bool | ||
val | int | |
min | int | |
max | int | |
return | bool |
public static Clamp ( float min, float max, float val ) : float | ||
min | float | |
max | float | |
val | float | |
return | float |
public static Clamp ( int min, int max, int val ) : int | ||
min | int | |
max | int | |
val | int | |
return | int |
public static Clamp ( long min, long max, long val ) : long | ||
min | long | |
max | long | |
val | long | |
return | long |
public static MultiplyChecked ( int initialValue, double multiplicator ) : int | ||
initialValue | int | |
multiplicator | double | |
return | int |
public static MultiplyChecked ( long initialValue, double multiplicator ) : long | ||
initialValue | long | |
multiplicator | double | |
return | long |
public static MultiplyChecked ( short initialValue, double multiplicator ) : short | ||
initialValue | short | |
multiplicator | double | |
return | short |