MCPcopy Create free account
hub / github.com/idank/explainshell / d3_ease_elastic

Function d3_ease_elastic

explainshell/web/static/js/d3.v3.js:4939–4946  ·  view source on GitHub ↗
(a, p)

Source from the content-addressed store, hash-verified

4937 return 1 - Math.sqrt(1 - t * t);
4938 }
4939 function d3_ease_elastic(a, p) {
4940 var s;
4941 if (arguments.length < 2) p = .45;
4942 if (arguments.length) s = p / (2 * π) * Math.asin(1 / a); else a = 1, s = p / 4;
4943 return function(t) {
4944 return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * π / p);
4945 };
4946 }
4947 function d3_ease_back(s) {
4948 if (!s) s = 1.70158;
4949 return function(t) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected