MCPcopy Index your code
hub / github.com/microsoft/SandDance / powp

Function powp

docs/app/js/sanddance-app.js:128843–128847  ·  view source on GitHub ↗
(base)

Source from the content-addressed store, hash-verified

128841 return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
128842}
128843function powp(base) {
128844 return base === 10 ? pow10 : base === Math.E ? Math.exp : function(x) {
128845 return Math.pow(base, x);
128846 };
128847}
128848function logp(base) {
128849 return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function(x) {
128850 return Math.log(x) / base;

Callers 1

rescaleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected