public static float GetLengthAS(this SplineBase spline, int curve, float tmax, float error) { Vector3[] v = spline.Slice(curve, tmax); float length = 0.0f; AddIfClose(v, ref length, error); return(length); }