/// <inheritdoc/> public override float GetLength(float start, float end, int maxNumberOfIterations, float tolerance) { int numberOfKeys = Count; if (numberOfKeys == 0) { return(0); } if (numberOfKeys == 1 && PreLoop != CurveLoopType.Linear && PostLoop != CurveLoopType.Linear) { return(0); } // TODO: Maybe a piecewise computation would be faster when the curve has non-continuous parts. // Difficulty: start and end are not on spline ends and can be outside. // For non-continuous curves the result can have an error larger than tolerance. return(CurveHelper.GetLength(this, start, end, 5, maxNumberOfIterations, tolerance)); }
/// <inheritdoc/> public float GetLength(float start, float end, int maxNumberOfIterations, float tolerance) { return(CurveHelper.GetLength(this, start, end, 2, maxNumberOfIterations, tolerance)); }