title: is there a function in c/c++ that gets integer sign and removes value?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c">Is there a standard sign function (signum, sgn) in C/C++?</a>  </p>
  </blockquote>
  
  
  
  <p>I mean something like an analog to <code>abs()</code> which removes sign but in this case a function that takes any negative integer and returns <code>-1</code>, <code>1</code> for positive and <code>0</code> remains unchanged ?</p>
  
  <p>(Yes, I know I could easily write that on my own, but I ask here if such a function is provided in a language.)</p>