Complements to the default Math class.
More...
|
| static int | Clamp (int a, int b, int x) |
| | Clamps a value withing a range.
|
| |
| static double | Clamp (double a, double b, double x) |
| |
Complements to the default Math class.
◆ Clamp() [1/2]
| static double Ch.Etml.Utils.Math2.Clamp |
( |
double | a, |
|
|
double | b, |
|
|
double | x ) |
|
static |
◆ Clamp() [2/2]
| static int Ch.Etml.Utils.Math2.Clamp |
( |
int | a, |
|
|
int | b, |
|
|
int | x ) |
|
static |
Clamps a value withing a range.
- Parameters
-
| a | Lower bound. |
| b | Upper bound. |
| x | Value to clamp. |
- Returns
- If the value is withing the range, returns the value. Otherwise returns the lower / upper bound depending on the original value.
The documentation for this class was generated from the following file:
- D:/Repositories/spicy-invaders/SpicyInvaders/SpicyInvaders/Etml/Utils/Math2.cs