Subject: CGAL users discussion list
List archive
- From: Bernd Gaertner <>
- To:
- Subject: Re: [cgal-discuss] Problem with point collinearity
- Date: Fri, 15 Jun 2007 16:11:58 +0200
wrote:
I can do:
Point1 P1(2,3);
Point2 P2(CGAL::to_double(P1.x()),CGAL::to_double(P1.y()));
But I think that this is not very efficient.
And it's not safe, since to_double is not exact on Quotient<double>.
You could either use simply double as NT (since it's a field number
type, there is no need to put a quotient on top), in which case the
above is safe (and works even without the to_double's). Or, if you
insist on NT = GAL::Quotient<double> for some reason, you could use
P2 ( CGAL::Gmpq(P1.x().numerator()) / CGAL::Gmpq(P1.x().denominator()),
CGAL::Gmpq(P1.y().numerator()) / CGAL::Gmpq(P1.y().denominator()) )
Bernd.
- Re: Re: [cgal-discuss] Problem with point collinearity, mafaldamartins, 06/15/2007
- Re: [cgal-discuss] Problem with point collinearity, Bernd Gaertner, 06/15/2007
- <Possible follow-up(s)>
- Re: Re: [cgal-discuss] Problem with point collinearity, mafaldamartins, 06/15/2007
- Re: [cgal-discuss] Problem with point collinearity, Bernd Gaertner, 06/15/2007
- Re: Re: [cgal-discuss] Problem with point collinearity, mafaldamartins, 06/15/2007
- A problem about convex_hull_3, dmyan, 06/17/2007
Archive powered by MHonArc 2.6.16.