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

Function logp

external/.d3.js:15236–15241  ·  view source on GitHub ↗
(base)

Source from the content-addressed store, hash-verified

15234}
15235
15236function logp(base) {
15237 return base === Math.E ? Math.log
15238 : base === 10 && Math.log10
15239 || base === 2 && Math.log2
15240 || (base = Math.log(base), x => Math.log(x) / base);
15241}
15242
15243function reflect(f) {
15244 return (x, k) => -f(-x, k);

Callers 1

rescaleFunction · 0.85

Calls 1

logMethod · 0.80

Tested by

no test coverage detected