Click or drag to resize

MathHelperLerp Method

Linearly interpolates between two values.

Namespace: CFX.Utilities
Assembly: CFX (in CFX.dll) Version: 1.7.3
Syntax
public static double Lerp(
	double value1,
	double value2,
	double amount
)

Parameters

value1  Double
Source value.
value2  Double
Source value.
amount  Double
Value between 0 and 1 indicating the weight of value2.

Return Value

Double
Interpolated value.
Remarks
This method performs the linear interpolation based on the following formula. value1 + (value2 - value1) * amount Passing amount a value of 0 will cause value1 to be returned, a value of 1 will cause value2 to be returned.
See Also