MCPcopy Create free account
hub / github.com/breck7/scroll / powish

Function powish

external/.d3.js:15391–15406  ·  view source on GitHub ↗
(transform)

Source from the content-addressed store, hash-verified

15389}
15390
15391function powish(transform) {
15392 var scale = transform(identity$3, identity$3),
15393 exponent = 1;
15394
15395 function rescale() {
15396 return exponent === 1 ? transform(identity$3, identity$3)
15397 : exponent === 0.5 ? transform(transformSqrt, transformSquare)
15398 : transform(transformPow(exponent), transformPow(1 / exponent));
15399 }
15400
15401 scale.exponent = function(_) {
15402 return arguments.length ? (exponent = +_, rescale()) : exponent;
15403 };
15404
15405 return linearish(scale);
15406}
15407
15408function pow() {
15409 var scale = powish(transformer$2());

Callers 3

powFunction · 0.85
sequentialPowFunction · 0.85
divergingPowFunction · 0.85

Calls 3

rescaleFunction · 0.85
linearishFunction · 0.85
transformFunction · 0.70

Tested by

no test coverage detected