2022-03-08 14:03:32 +08:00
|
|
|
export const cubic = (value: number): number => value ** 3
|
2020-08-07 14:05:12 +08:00
|
|
|
|
2021-09-04 19:29:28 +08:00
|
|
|
export const easeInOutCubic = (value: number): number =>
|
|
|
|
value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2
|