doodler/timing/EaseInOut.ts
2023-02-15 17:46:41 -07:00

2 lines
100 B
TypeScript

export const easeInOut = (x: number) =>
x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;