Click or drag to resize
DigitalRunePiecewiseCurveTParam, TPoint, TCurveKeyGetKeyIndex Method
Gets the index of the curve key before or at the given parameter value.

Namespace: DigitalRune.Mathematics.Interpolation
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public abstract int GetKeyIndex(
	TParam parameter
)

Parameters

parameter
Type: TParam
The parameter value.

Return Value

Type: Int32
The index of the curve key or -1 if no suitable curve key exists.
Remarks
This method assumes that the curve keys are sorted and returns index of the key with the largest Parameter value that is less than or equal to the given parameter value. The parameter will lie between the key at the returned index and the key at index + 1. If parameter is beyond the start or end of the path, a key index according to PreLoop and PostLoop is returned.
See Also