MCPcopy
hub / github.com/chartjs/Chart.js / generate

Function generate

test/specs/helpers.easing.tests.js:41–53  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

39 };
40
41 function generate(method) {
42 var fn = helpers.easingEffects[method];
43 var accuracy = Math.pow(10, 8);
44 var count = 10;
45 var values = [];
46 var i;
47
48 for (i = 0; i <= count; ++i) {
49 values.push(Math.round(accuracy * fn(i / count)) / accuracy);
50 }
51
52 return values;
53 }
54
55 Object.keys(helpers.easingEffects).forEach(function(method) {
56 it ('"' + method + '" should return expected values', function() {

Callers 2

cachedKeysFunction · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected