Subject: CGAL users discussion list
List archive
- From: Simon Giraudot <>
- To:
- Subject: Re: [cgal-discuss] read_xyz_points function
- Date: Tue, 2 Aug 2016 07:38:11 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:rv1DDxW51amSgSLX0XVBdtbsYvfV8LGtZVwlr6E/grcLSJyIuqrYZhGHt8tkgFKBZ4jH8fUM07OQ6PG4HzNeqsfe+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLshrj0pMOYMloArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6Lpyv/JHBK71dqB9Qb1DByk9KEg04tfqvF/NV1ih/HwZB14Xlx1OSyfE9hjnUpDt+n/ht+963m+VPNf/ULwzRRyt4qBuRQPymSkOPCI+6nCRgct12vEI6Cm9rgByltaHKLqeM+BzK/vQ
Le 29/07/2016 à 17:27, Kelvin_Piroddi a
écrit :
Hi I am using the read_xyz_points function to read points from a text file. My code is: if (!stream || !CGAL::read_xyz_points(stream, std::back_inserter(points), CGAL::First_of_pair_property_map<PointVectorPair>())) My input point is: 1.8286 -9.5767 1601.5552 but output is: 1.8286 -9.5767 1601.56 I am not sure why the number of decimal places for z is now 2. Is there a way to ensure that the number of decimal places for input and output remains the same? Thank you -- View this message in context: http://cgal-discuss.949826.n4.nabble.com/read-xyz-points-function-tp4662115.html Sent from the cgal-discuss mailing list archive at Nabble.com.Hello, How do you get this output? If you are printing it using a standard stream function, notice that the displayed value is rounded with a default precision (which can explain why you don't see the last decimals). You can set the precision of display manually to make sure there's no loss of information: http://en.cppreference.com/w/cpp/io/ios_base/precision -- Simon Giraudot, PhD R&D Engineer GeometryFactory - http://geometryfactory.com/ |
- Re: [cgal-discuss] read_xyz_points function, Simon Giraudot, 08/02/2016
Archive powered by MHonArc 2.6.18.