public static double LerpAngle(double a, double b, double t) { double num = Mathd.Repeat(b - a, 360d); if (num > 180.0d) { num -= 360d; } return(a + num * Mathd.Clamp01(t)); }
public static double SmoothStep(double from, double to, double t) { t = Mathd.Clamp01(t); t = (-2.0 * t * t * t + 3.0 * t * t); return(to * t + from * (1.0 - t)); }
public static double Lerp(double from, double to, double t) { return(from + (to - from) * Mathd.Clamp01(t)); }
public static Vector3d Lerp(Vector3d from, Vector3d to, double t) { t = Mathd.Clamp01(t); return(new Vector3d(from.x + (to.x - from.x) * t, from.y + (to.y - from.y) * t, from.z + (to.z - from.z) * t)); }