mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-15 13:38:29 +02:00
![dependabot[bot]](/assets/img/avatar_default.png)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: thinkasany <480968828@qq.com> Co-authored-by: afc163 <afc163@gmail.com>
9 lines
272 B
TypeScript
9 lines
272 B
TypeScript
export function easeInOutCubic(t: number, b: number, c: number, d: number) {
|
|
const cc = c - b;
|
|
t /= d / 2;
|
|
if (t < 1) {
|
|
return (cc / 2) * t * t * t + b;
|
|
}
|
|
// biome-ignore lint: it is a common easing function
|
|
return (cc / 2) * ((t -= 2) * t * t + 2) + b;
|
|
}
|