MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / sgn

Function sgn

utilities/olcUTIL_Geometry2D.h:555–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553 //https://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c
554 template <typename T>
555 constexpr int sgn(T val) { return (T(0) < val) - (val < T(0)); }
556
557 // Defines a line segment
558 template<typename T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected