mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
9 lines
187 B
JavaScript
9 lines
187 B
JavaScript
|
var SmootherStep = function (x, min, max)
|
||
|
{
|
||
|
x = Math.max(0, Math.min(1, (x - min) / (max - min)));
|
||
|
|
||
|
return x * x * x * (x * (x * 6 - 15) + 10);
|
||
|
};
|
||
|
|
||
|
module.exports = SmootherStep;
|