ant-design/components/_util/easings.ts
dependabot[bot] fe28d002e4
chore: migrate @biomejs/biome from 1.9.4 to 2.0.0 (#54118)
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>
2025-06-18 18:55:45 +08:00

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;
}