g-truc/glm — pull request #271 by plasmacel (2014-11-20 14:44:00+00:00)
Title: fast branchless sign function

this implementation of the sign function is fast, branchless and works with any glm type

reference
http://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c