Class MathHelper
- Namespace
- SimulationFramework
- Assembly
- SimulationFramework.dll
Contains various useful math-related methods.
public static class MathHelper
- Inheritance
-
MathHelper
- Inherited Members
Methods
Lerp(float, float, float)
Linearly interpolates between two values.
public static float Lerp(float a, float b, float t)
Parameters
a
floatThe first value.
b
floatThe second value.
t
floatThe interpolation amount, from 0.0 to 1.0.
Returns
- float
The interpolated value.
LerpClamped(float, float, float)
Linearly interpolates between two values, clamping the result between the two values..
public static float LerpClamped(float a, float b, float t)
Parameters
a
floatThe first value.
b
floatThe second value.
t
floatThe interpolation amount, from 0.0 to 1.0.
Returns
- float
The interpolated value.
Normalize(float)
Clamps a float to range [0.0, 1.0]
public static float Normalize(float value)
Parameters
value
floatThe value to normalize.
Returns
- float
The normalized value.