138
rated 0 times
[
139]
[
1]
/ answers: 1 / hits: 15247
/ 14 Years ago, thu, june 24, 2010, 12:00:00
I have been using Math.Round(myNumber, MidpointRounding.ToEven)
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 Ajax request) creating a JavaScript method to replicate the MidpointRounding.ToEven
method used by C#.
MidpointRounding.ToEven is Gaussian/banker's rounding, a very common rounding method for accounting systems described here.
Does anyone have any experience with this? I have found examples online, but they do not round to a given number of decimal places...
More From » rounding