| InterpolationHelperLerp Method (QuaternionD, QuaternionD, Double) |
Namespace: DigitalRune.Mathematics.InterpolationAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static QuaternionD Lerp(
QuaternionD source,
QuaternionD target,
double parameter
)
Public Shared Function Lerp (
source As QuaternionD,
target As QuaternionD,
parameter As Double
) As QuaternionD
public:
static QuaternionD Lerp(
QuaternionD source,
QuaternionD target,
double parameter
)
static member Lerp :
source : QuaternionD *
target : QuaternionD *
parameter : float -> QuaternionD
Parameters
- source
- Type: DigitalRune.Mathematics.AlgebraQuaternionD
The start quaternion. - target
- Type: DigitalRune.Mathematics.AlgebraQuaternionD
The end quaternion. - 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:
QuaternionDThe linear interpolation of the two quaternions.
Remarks Lerp(a, b, 0) returns a. Lerp(a, b, 1) returns b.
Linear interpolation usually creates non-normalized quaternions. This method automatically
renormalizes the result.
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