mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 17:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package gskinner.motion.easing
|
||||
{
|
||||
public class Exponential
|
||||
{
|
||||
|
||||
public function Exponential()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function easeIn(param1:Number, param2:Number, param3:Number, param4:Number) : Number
|
||||
{
|
||||
return param1 == 0 ? 0 : Math.pow(2,10 * (param1 - 1));
|
||||
}
|
||||
|
||||
public static function easeOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number
|
||||
{
|
||||
return param1 == 1 ? 1 : 1 - Math.pow(2,-10 * param1);
|
||||
}
|
||||
|
||||
public static function easeInOut(param1:Number, param2:Number, param3:Number, param4:Number) : Number
|
||||
{
|
||||
if(param1 == 0 || param1 == 1)
|
||||
{
|
||||
return param1;
|
||||
}
|
||||
if(0 > (param1 = param1 * 2 - 1))
|
||||
{
|
||||
return 0.5 * Math.pow(2,10 * param1);
|
||||
}
|
||||
return 1 - 0.5 * Math.pow(2,-10 * param1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user