title: Converting a double to an int in Javascript without rounding
body: <p>In C# the following code returns 2:</p>
  
  <pre><code>double d = 2.9;
  int i = (int)d;
  Debug.WriteLine(i);
  </code></pre>
  
  <p>In Javascript, however, the only way of converting a "double" to an "int" that I'm aware of is by using Math.round/floor/toFixed etc. Is there a way of converting to an int in Javascript without rounding? I'm aware of the performance implications of Number() so I'd rather avoid converting it to a string if at all possible.</p>