cgal/Packages/Interval_arithmetic/test/Interval_arithmetic/tst_static_adaptatif.C

43 lines
987 B
C

// Test program for the Static Adaptatif filter.
#define CGAL_DENY_INEXACT_OPERATIONS_ON_FILTER
#include <CGAL/basic.h>
#include <iostream>
#ifndef CGAL_IA_NEW_FILTERS
int main()
{
std::cout << "NOT TESTED" << std::endl;
return 0;
}
#else
#include <CGAL/MP_Float.h>
#include <CGAL/Filtered_exact.h>
#include <CGAL/predicates/kernel_ftC2.h>
typedef CGAL::Filtered_exact<double, CGAL::MP_Float, CGAL::Static> NT;
// typedef CGAL::Filtered_exact<double, CGAL::Filtered_exact<double, double>, CGAL::Static> NT;
int main()
{
using std::cout;
using std::endl;
double px=0; double py=0;
double qx=1; double qy=0;
double rx=0; double ry=1;
cout << "Call of orientationC2(";
cout << px<<","<<py<<","<<qx<<","<<qy<<","<<rx<<","<<ry<<")\n";
cout << "double : " << (int)CGAL::orientationC2(px,py,qx,qy,rx,ry);
cout << endl;
cout << "(SAF) : ";
cout << (int)CGAL::orientationC2(NT(px), NT(py), NT(qx), NT(qy), NT(rx), NT(ry));
cout << endl;
return 0;
}
#endif