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

Function sign

src/plots/smith/helpers.js:3–8  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1'use strict';
2
3function sign(x) {
4 return (
5 x < 0 ? -1 :
6 x > 0 ? 1 : 0
7 );
8}
9
10// adapted from Mike Bostock's https://observablehq.com/@mbostock/smith-chart
11function smith(a) {

Callers 1

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