Class MathLerp
- Namespace
- Fantas
- Assembly
- Fantas.dll
Contains helper methods for doing Lerp to make it easier port games from MonoGame to Fantas Some methods imported from XNA/MonoGame MathHelper https://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/MathHelper.cs
public static class MathLerp
- Inheritance
-
MathLerp
- Inherited Members
Methods
Lerp(double, double, double)
Linearly interpolates between two values.
public static double Lerp(double value1, double value2, double amount)
Parameters
value1
doubleSource value.
value2
doubleDestination value.
amount
doubleValue between 0 and 1 indicating the weight of value2.
Returns
- double
Interpolated value.
Lerp(float, float, float)
Linearly interpolates between two values.
public static float Lerp(float value1, float value2, float amount)
Parameters
value1
floatSource value.
value2
floatDestination value.
amount
floatValue between 0 and 1 indicating the weight of value2.
Returns
- float
Interpolated value.