SHARE
TWEET

Untitled

a guest Nov 23rd, 2018 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static function alerp(a:Number, b:Number, lerp:Number):Number
  2.         {
  3.             var d:Number = Math.abs(a - b);
  4.             var which:Boolean;
  5.             if (a > b)
  6.             {
  7.                 b += 360;
  8.                 which = false;
  9.             } else {
  10.                 a += 360;
  11.                 which = true;
  12.             }
  13.             if (Math.abs(a - b) > d)
  14.             {
  15.                 if (which)
  16.                 {
  17.                     a -= 360;
  18.                 } else {
  19.                     b -= 360;
  20.                 }
  21.             }
  22.             return lerp * (b - a) + a;
  23.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top