Avoid rounding errors (fixes #1068)
Merge pull request #1077 from AudriusButkevicius/round

Avoid rounding errors (fixes #1068)