title: Is there a elegant way to convert a positive number to a +1 and a negative number to a -1?
body: <p>I have a high-performance component that needs to convert a values to -1, +1 or 0.</p>
  
  <pre><code>    static int ToOne(double value) {
          return (int)(value == 0D ? value : value / Math.Abs(value));
      }
  </code></pre>
  
  <p>The above methods are not elegant, is there any other way to do this?</p>