MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / sgn

Function sgn

test/compute-engine/nightly/comparison-matrix.test.ts:156–156  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

154 ];
155}
156const sgn = (n: number) => (n < 0 ? -1 : n > 0 ? 1 : n === 0 ? 0 : NaN);
157
158describeNightly('NIGHTLY comparison — order() is a total order', () => {
159 const xs = orderPool();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected