rifter1818
Well-known member
Is there a function for rounding to whole numbers that allways rounds up on excactly .5 Cint() and cbyte() both round to the nearest even number in the case of .5.....
or if you want to Round up to the nearest whole number its math.ceiling()Originally posted by Nerseus
If you check out the help in MSDN, youll see that Math.Round is supposed to round the way it does. It might not make sense to "most" of us, but it now matches the standards. Go figure.
Any easy solution is to offset your number and use Floor. If you want to round to the nearest whole number, use:
Math.Floor(d + 0.5)
For 1 decimal place:
Math.Floor(d + 0.05)
For 2 decimals:
Math.Floor(d + 0.005)
You get the idea.
-Nerseus