phaser/Phaser/system/easing/Quartic.js
Richard Davey e74114f384 Docs
2013-08-12 00:52:35 +01:00

29 lines
872 B
JavaScript

var Phaser;
(function (Phaser) {
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing - Quartic
*
* For use with Phaser.Tween
*/
(function (Easing) {
var Quartic = (function () {
function Quartic() { }
Quartic.In = function In(k) {
return k * k * k * k;
};
Quartic.Out = function Out(k) {
return 1 - (--k * k * k * k);
};
Quartic.InOut = function InOut(k) {
if((k *= 2) < 1) {
return 0.5 * k * k * k * k;
}
return -0.5 * ((k -= 2) * k * k * k - 2);
};
return Quartic;
})();
Easing.Quartic = Quartic;
})(Phaser.Easing || (Phaser.Easing = {}));
var Easing = Phaser.Easing;
})(Phaser || (Phaser = {}));