title: Gaussian/banker's rounding in JavaScript
body: <p>I have been using <code>Math.Round(myNumber, MidpointRounding.ToEven)</code> in C# to do my server-side rounding, however, the user needs to know 'live' what the result of the server-side operation will be which means (avoiding an <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="noreferrer">Ajax</a> request) creating a JavaScript method to replicate the <code>MidpointRounding.ToEven</code> method used by C#.</p>
  
  <p>MidpointRounding.ToEven is Gaussian/<a href="https://en.wikipedia.org/wiki/Rounding#Round_half_to_even" rel="noreferrer">banker's rounding</a>, a very common rounding method for accounting systems described <a href="http://en.wikipedia.org/wiki/Rounding#Round_half_to_even" rel="noreferrer">here</a>.</p>
  
  <p>Does anyone have any experience with this? I have found examples online, but they do not round to a <strong>given</strong> number of decimal places...</p>