예제 #1
0
        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));
        }
예제 #2
0
 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));
 }
예제 #3
0
 public static double Lerp(double from, double to, double t)
 {
     return(from + (to - from) * MathD.Clamp01(t));
 }