[Liblas-commits] hg: try rounding instead of int() cast

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Dec 31 14:04:42 EST 2009


changeset 2b101e8352b8 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=2b101e8352b8
summary: try rounding instead of int() cast

diffstat:

 python/tests/File.txt |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (28 lines):

diff -r e5eb20a4b707 -r 2b101e8352b8 python/tests/File.txt
--- a/python/tests/File.txt	Thu Dec 31 12:01:59 2009 -0600
+++ b/python/tests/File.txt	Thu Dec 31 13:00:11 2009 -0600
@@ -184,15 +184,15 @@
   <liblas.point.Point object at ...>
 
   >>> for g in points:
-  ...   print int(g.x), int(g.y)
-  630262 4834500
-  630282 4834500
-  630300 4834500
-  630346 4834500
-  630327 4834500
-  630323 4834500
-  630320 4834500
-  630280 4834500
+  ...   print round(g.x, 6), round(g.y, 6)
+  630262.3 4834500.0
+  630282.45 4834500.0
+  630300.07 4834500.0
+  630346.82 4834500.0
+  630327.57 4834500.0
+  630323.57 4834500.0
+  630320.95 4834500.0
+  630280.89 4834500.0
     
   >>> import os
   >>> os.remove('junk.las')


More information about the Liblas-commits mailing list