Subject: CGAL users discussion list
List archive
- From: Michael Hemmer <>
- To: "" <>
- Subject: Re: [cgal-discuss] how to convert "rational" value to other formats?
- Date: Thu, 06 Mar 2008 15:49:11 +0100
Mahmood Naderan wrote:
Hello,There is CGAL::to_double which converts a number into double. (see also CGAL::To_interval)
How it is possible to convert a rational value to float or double or integer?
In other word, I want something like "Alg_point_2 <-- Rat_point_2".
In case you want to convert to Integer you can use CGAL::Fraction_traits<Rational>. The traits can decompose a type and provides the correct Numerator and Denominator type.
Supported types are CORE::BigRat, leda::rational, Gmpq and others.
Michael
- Re: [cgal-discuss] how to convert "rational" value to other formats?, Michael Hemmer, 03/06/2008
Archive powered by MHonArc 2.6.16.