[Qgis-developer] Strange modulus calculations in QGIS
Andreas Neumann
a.neumann at carto.net
Wed May 6 02:40:30 PDT 2015
Hi,
I am using modules calculations to distinguish major from minor contour
lines. However, the modulus calculations have two issue:
1. the results have rounding issue:
f.e. 467.9 % 0.2 results in 0.0999999999999513 - I know I could use a
round function as a workaround - but it is annoying!
2. there are very strange results:
468.0 % 0.2 results in 0.1999999999999974 -> I would expect a result of
"0"
Is there something we can do to fix these two issues?
Thanks,
Andreas
More information about the Qgis-developer
mailing list