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

Function sign

src/traces/bar/plot.js:40–42  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

38
39// Returns -1 if v < 0, 1 if v > 0, and 0 if v == 0
40function sign(v) {
41 return (v > 0) - (v < 0);
42}
43
44// Returns 1 if a < b and -1 otherwise
45// (For the purposes of this module we don't care about the case where a == b)

Callers 1

plotFunction · 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…