also test leda if it is available

This commit is contained in:
Andreas Fabri 2013-03-22 16:05:46 +01:00
parent 4d2f9280e8
commit 37533355fe
2 changed files with 28 additions and 2 deletions

View File

@ -5,7 +5,21 @@
#include <cassert>
// choose number type
#ifdef CGAL_USE_GMP
// choose number type
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational exact_ring_t;
typedef leda_rational exact_field_t;
namespace CGAL {
// needed for the drawing methods
leda_rational sqrt(const leda_rational& x) {
return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) );
}
}
#elif defined( CGAL_USE_GMP )
# include <CGAL/Gmpq.h>
typedef CGAL::Gmpq exact_ring_t;

View File

@ -5,7 +5,19 @@
#include <cassert>
// choose number type
#ifdef CGAL_USE_GMP
#ifdef CGAL_USE_LEDA
# include <CGAL/leda_rational.h>
typedef leda_rational exact_ring_t;
typedef leda_rational exact_field_t;
namespace CGAL {
// needed for the drawing methods
leda_rational sqrt(const leda_rational& x) {
return leda_rational( CGAL::sqrt( CGAL::to_double(x) ) );
}
}
#elif defined( CGAL_USE_GMP )
# include <CGAL/Gmpq.h>
typedef CGAL::Gmpq exact_ring_t;