From 8b7ca88fc53948234bcae38dbed0404db106e1cc Mon Sep 17 00:00:00 2001 From: Monique Teillaud Date: Wed, 5 Apr 2000 08:14:27 +0000 Subject: [PATCH] appel a rand_get_int supprime remplace par indice aleatoire calcules par locate --- .../include/CGAL/Triangulation_3.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_3.h index ca07830cf57..aedfc0085fb 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_3.h @@ -34,7 +34,7 @@ #include #include -#include +// #include #include #include @@ -1462,7 +1462,11 @@ locate(const Point & p, // separating p from the rest of the triangulation // lt = OUTSIDE_AFFINE_HULL if p is not coplanar with the triangulation { - static Random rand( (long) 0 ); + // static Random rand( (long) 0 ); + static int rand = 0; + const int rand_a = 421; + const int rand_b = 2073; + const int rand_c = 32749; int i, inf; Point p0,p1,p2,p3; switch (dimension()) { @@ -1484,7 +1488,9 @@ locate(const Point & p, // else c is finite // we test its facets in a random order until we find a // neighbor to go further - i = rand.get_int(0,4); + // i = rand.get_int(0,4); + rand = ( rand_a * rand + rand_b ) % rand_c; + i = rand &3; p0 = c->vertex( i )->point(); p1 = c->vertex( (i+1)&3 )->point(); p2 = c->vertex( (i+2)&3 )->point(); @@ -1624,7 +1630,9 @@ locate(const Point & p, // else c is finite // we test its edges in a random order until we find a // neighbor to go further - i = rand.get_int(0,3); + // i = rand.get_int(0,3); + rand = ( rand_a * rand + rand_b ) % rand_c; + i = rand %3; p0 = c->vertex( i )->point(); p1 = c->vertex( ccw(i) )->point(); p2 = c->vertex( cw(i) )->point();