MCPcopy Create free account
hub / github.com/plotly/plotly.js / scale

Function scale

src/traces/image/calc.js:48–52  ·  view source on GitHub ↗
(zero, ratio, min, max)

Source from the content-addressed store, hash-verified

46};
47
48function scale(zero, ratio, min, max) {
49 return function(c) {
50 return Lib.constrain((c - zero) * ratio, min, max);
51 };
52}
53
54function constrain(min, max) {
55 return function(c) { return Lib.constrain(c, min, max);};

Callers 1

makeScalerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…