title: Rounding a number to exactly two decimal places for currency formatting
body: <p>I need to round to two decimal places for currency.</p>
  
  <p>Both</p>
  
  <pre><code>Math.round(num*Math.pow(10,2))/Math.pow(10,2)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Math.round(num*Math.pow(10,2))/Math.pow(10,2)
  </code></pre>
  
  <p>work except it cuts any trailing zero's off so I get <code>29.9</code> instead of <code>29.90</code>.</p>
  
  <p>What is the best way around this?</p>