MCPcopy Index your code
hub / github.com/plotly/plotly.js / mod

Function mod

src/lib/mod.js:7–10  ·  view source on GitHub ↗

* sanitized modulus function that always returns in the range [0, d) * rather than (-d, 0] if v is negative

(v, d)

Source from the content-addressed store, hash-verified

5 * rather than (-d, 0] if v is negative
6 */
7function mod(v, d) {
8 var out = v % d;
9 return out < 0 ? out + d : out;
10}
11
12/**
13 * sanitized modulus function that always returns in the range [-d/2, d/2]

Callers 6

dates.jsFile · 0.85
formatTimeFunction · 0.85
isAngleInsideSectorFunction · 0.85
geometry2d.jsFile · 0.85
polar.jsFile · 0.85
computeSectorBBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected