source: node_modules/victory-vendor/lib-vendor/d3-ease/src/bounce.js

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

Added visualizations

  • Property mode set to 100644
File size: 653 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.bounceIn = bounceIn;
7exports.bounceInOut = bounceInOut;
8exports.bounceOut = bounceOut;
9var b1 = 4 / 11,
10 b2 = 6 / 11,
11 b3 = 8 / 11,
12 b4 = 3 / 4,
13 b5 = 9 / 11,
14 b6 = 10 / 11,
15 b7 = 15 / 16,
16 b8 = 21 / 22,
17 b9 = 63 / 64,
18 b0 = 1 / b1 / b1;
19function bounceIn(t) {
20 return 1 - bounceOut(1 - t);
21}
22function bounceOut(t) {
23 return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
24}
25function bounceInOut(t) {
26 return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
27}
Note: See TracBrowser for help on using the repository browser.