Possible Duplicate:
Is there a standard sign function (signum, sgn) in C/C++?
I mean something like an analog to abs() which removes sign but in this case a function that takes any negative integer and returns -1, 1 for positive and 0 remains unchanged ?
(Yes, I know I could easily write that on my own, but I ask here if such a function is provided in a language.)