Method GetCurveLength
GetCurveLength(int)
Return the length of a curve.
Declaration
public float GetCurveLength(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The index of the curve for which the length needs to be retrieved. |
Returns
Type | Description |
---|---|
float | Returns the length of the curve of index 'index' in the spline. |
Implements
Remarks
It is inefficient to call this method frequently, as it will calculate the length of the curve every time it is invoked. In cases where performance is critical, create a new Spline or NativeSpline instead. Note that you may pass a SplineSlice<T> to constructors for both Spline and NativeSpline.