Click or drag to resize
DigitalRuneInterpolationHelperLerp Method (VectorD, VectorD, Double)
Performs a linear interpolation between two VectorD.

Namespace: DigitalRune.Mathematics.Interpolation
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public static VectorD Lerp(
	VectorD source,
	VectorD target,
	double parameter
)

Parameters

source
Type: DigitalRune.Mathematics.AlgebraVectorD
The source vector.
target
Type: DigitalRune.Mathematics.AlgebraVectorD
The target vector.
parameter
Type: SystemDouble
The interpolation parameter that lies in the interval [0,1]; also known as interpolation factor or weight of the target value.

Return Value

Type: VectorD
The linear interpolation of two vectors.
Exceptions
ExceptionCondition
ArgumentNullExceptionsource or target is .
ArgumentException The numbers of elements of the two vectors do not match.
Remarks

Lerp(a, b, 0) returns a. Lerp(a, b, 1) returns b.

The interpolation parameter can lie outside of the interval [0, 1]. Outside of this interval the method actually performs an extrapolation instead of an interpolation.

See Also