DislikedI did found a problem rounding up decimals when the variable type is double. (16 digits precision) <snip> 0.10 * 1.1 = 0. 1100000000000001Ignored
Inserted Code
Alert(76.671);
even if you do:
Inserted Code
Alert(NormalizeDouble(76.671,3));
only if you do:
Inserted Code
Alert(NormalizeDouble(76.671,2));
I remember i've been figthing with that in the past, but your solution is indeed very elegant. Shouldn't have to be that way, but who cares.
Smart!