MCPcopy Create free account
hub / github.com/MyGUI/mygui / nonZeroSign

Function nonZeroSign

MyGUIEngine/src/msdfgen/core/arithmetics.hpp:59–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57/// Returns 1 for non-negative values and -1 for negative values.
58template <typename T>
59inline int nonZeroSign(T n) {
60 return 2*(n > T(0))-1;
61}
62
63}

Callers 3

resetMethod · 0.85
signedDistanceMethod · 0.85
arcAngleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected