[QGIS-Developer] On precision in qgsRound() (3.3.0 master)

Nyall Dawson nyall.dawson at gmail.com
Mon Sep 10 16:07:41 PDT 2018


On Mon, 10 Sep 2018 at 20:04, andreaerdna <andreaerdna at libero.it> wrote:

> It seems to me that there is a flaw in qgsRound...
>  I think
> 'scaleFactor' should be qlonglong in order to correctly store at least the
> 12th power of 10 (while 'places' could be Int or less; and the
> static_cast<qlonglong> could be <qulonglong>, provided that qgsRound() is
> only used to round measurements, as it seems to be now).

Yes, that looks correct! Can you open a PR with a test case fixing this?

Nyall


More information about the QGIS-Developer mailing list