mirror of https://github.com/CGAL/cgal
also test leda if it is available
This commit is contained in:
parent
4d2f9280e8
commit
37533355fe
|
|
@ -5,7 +5,21 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// choose number type
|
// 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>
|
# include <CGAL/Gmpq.h>
|
||||||
typedef CGAL::Gmpq exact_ring_t;
|
typedef CGAL::Gmpq exact_ring_t;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,19 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// choose number type
|
// 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>
|
# include <CGAL/Gmpq.h>
|
||||||
typedef CGAL::Gmpq exact_ring_t;
|
typedef CGAL::Gmpq exact_ring_t;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue