MCPcopy Create free account
hub / github.com/VCVRack/Rack / sgn

Function sgn

include/math.hpp:95–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93*/
94template <typename T>
95T sgn(T x) {
96 return x > 0 ? 1 : (x < 0 ? -1 : 0);
97}
98
99////////////////////
100// basic float functions

Callers 1

sgnfFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected