You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
210 B

5 years ago
export function cubicIn(t) {
return t * t * t;
}
export function cubicOut(t) {
return --t * t * t + 1;
}
export function cubicInOut(t) {
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
}