Extensions for floating-point number types.
More...
|
static float | Bound (this float value, float min, float max) |
| Clamps the value between the specified min & max . More...
|
|
static bool | EqualsWithin (this double n, double other, double epsilon=double.Epsilon) |
| Compares two double types for equality using double.Epsilon. More...
|
|
static bool | EqualsWithin (this float n, float other, float epsilon=float.Epsilon) |
| Compares two float types for equality using float.Epsilon. More...
|
|
Extensions for floating-point number types.
◆ Bound()
static float VolumeControl.TypeExtensions.RealNumberExtensions.Bound |
( |
this float |
value, |
|
|
float |
min, |
|
|
float |
max |
|
) |
| |
|
static |
Clamps the value between the specified min & max .
◆ EqualsWithin() [1/2]
static bool VolumeControl.TypeExtensions.RealNumberExtensions.EqualsWithin |
( |
this double |
n, |
|
|
double |
other, |
|
|
double |
epsilon = double.Epsilon |
|
) |
| |
|
static |
Compares two double types for equality using double.Epsilon.
- Parameters
-
n | This number. |
other | A number to compare this number to. |
epsilon | The epsilon comparsion threshold value. |
- Returns
- True when n and other are less than epsilon apart.
◆ EqualsWithin() [2/2]
static bool VolumeControl.TypeExtensions.RealNumberExtensions.EqualsWithin |
( |
this float |
n, |
|
|
float |
other, |
|
|
float |
epsilon = float.Epsilon |
|
) |
| |
|
static |
Compares two float types for equality using float.Epsilon.
- Parameters
-
n | This number. |
other | A number to compare this number to. |
epsilon | The epsilon comparsion threshold value. |
- Returns
- True when n and other are less than epsilon apart.
The documentation for this class was generated from the following file: