]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Don't drop precision from floating point GP coordinates
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Oct 2011 02:19:16 +0000 (14:19 +1200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Oct 2011 02:19:16 +0000 (14:19 +1200)
Using '%f' limits the precision to 6 decimals, which may well be
perfectly ok.  But at least in theory you *could* have higher precision,
and gps units will report it, so don't mindlessly limit us to what %f
shows.

This arbitrarily uses '%.12g' instead.  %g will drop excess zeroes at
the end, so it actually results in the same (or shorter) ascii
representation unless you have the extra precision.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found