2013-02-26, 04:23 PM
MountLag Wrote:Oh so it returned 162 instead of rounding up to 163, due to 162 being even. Well there's the problem lol.Well darn, I missed that detail. Thanks. I guess I should have read the docs more closely. That sort of rounding behavior isn't intuitive at all, but there's no excuse for me to have missed that.
edit: from your link, in case it wasn't clear what I was referring to.
Substituted round for roundNearest where roundNearest is
Code:
roundNearest x =
let (whole, frac) = properFraction x in
if frac >= 0.5 then whole + 1 else wholeAll is fine now.

