Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem with point collinearity

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem with point collinearity


Chronological Thread 
  • From: Bernd Gaertner <>
  • To:
  • Subject: Re: [cgal-discuss] Problem with point collinearity
  • Date: Fri, 15 Jun 2007 14:28:51 +0200


wrote:
Hi,

thank you very very much for your help, it worked perfectly.

However, the double points that I want to check the collinearity are
"alleatory" (i.e., I don“t know them in advance). There is any easy way to
convert them to a rational type number?

There is an operator>> that reads a decimal floating-point literal such
as "1.4" into a rational number of type CGAL::Gmpq; the conversion is
lossless (see the doc of CGAL::Gmpq). As pointed out by Sylvain, if
you have already read "1.4" into a double value, it's too late to
recover the decimal value 1.4 exactly.

Bernd Gaertner.



Archive powered by MHonArc 2.6.16.

Top of Page