ant-design/components/_util/easings.ts

13 lines
269 B
TypeScript
Raw Normal View History

2019-07-25 10:59:16 +08:00
const Easings = {
2019-07-25 10:10:53 +08:00
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;
}
return (cc / 2) * ((t -= 2) * t * t + 2) + b;
},
};
2019-07-25 10:59:16 +08:00
export default Easings;