source: node_modules/d3-ease/src/back.js@ a762898

Last change on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 660 bytes
Line 
1var overshoot = 1.70158;
2
3export var backIn = (function custom(s) {
4 s = +s;
5
6 function backIn(t) {
7 return (t = +t) * t * (s * (t - 1) + t);
8 }
9
10 backIn.overshoot = custom;
11
12 return backIn;
13})(overshoot);
14
15export var backOut = (function custom(s) {
16 s = +s;
17
18 function backOut(t) {
19 return --t * t * ((t + 1) * s + t) + 1;
20 }
21
22 backOut.overshoot = custom;
23
24 return backOut;
25})(overshoot);
26
27export var backInOut = (function custom(s) {
28 s = +s;
29
30 function backInOut(t) {
31 return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
32 }
33
34 backInOut.overshoot = custom;
35
36 return backInOut;
37})(overshoot);
Note: See TracBrowser for help on using the repository browser.