Пример #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 PingPong(double t, double length)
 {
     t = MathD.Repeat(t, length * 2d);
     return(length - Math.Abs(t - length));
 }