public static Vector3 Interp(Path pts, float t, EasingType ease = EasingType.Linear, bool easeIn = true, bool easeOut = true)
{
t = Ease(t, ease, easeIn, easeOut);
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.Interp(Wrap(pts), t));
}
}