public static Vector3 InterpConstantSpeed(Path pts, float t, Easing.EaseType easeType = Easing.EaseType.linear)
{
t = Easing.ease(easeType, t);
if (pts.Length == 0)
{
return(Vector3.zero);
}
else if (pts.Length == 1)
{
return(pts[0]);
}
else if (pts.Length == 2)
{
return(Vector3.Lerp(pts[0], pts[1], t));
}
else if (pts.Length == 3)
{
return(QuadBez.Interp(pts[0], pts[2], pts[1], t));
}
else if (pts.Length == 4)
{
return(CubicBez.Interp(pts[0], pts[3], pts[1], pts[2], t));
}
else
{
return(CRSpline.InterpConstantSpeed(Wrap(pts), t));
}
}