mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-26 09:38:05 -05:00
17 lines
382 B
Haxe
17 lines
382 B
Haxe
package funkin.util;
|
|
|
|
class EaseUtil
|
|
{
|
|
/**
|
|
* Returns an ease function that eases via steps.
|
|
* Useful for "retro" style fades (week 6!)
|
|
* @param steps how many steps to ease over
|
|
* @return Float->Float
|
|
*/
|
|
public static inline function stepped(steps:Int):Float->Float
|
|
{
|
|
return function(t:Float):Float {
|
|
return Math.floor(t * steps) / steps;
|
|
}
|
|
}
|
|
}
|