mirror of https://github.com/CGAL/cgal
fix Residue constructor from long int
see feature description, change 2.2: https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Modular_arithmetic_fixes
This commit is contained in:
parent
1577aa4c56
commit
8ea840d722
|
|
@ -16,7 +16,7 @@
|
|||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Sylvain Pion, Michael Hemmer
|
||||
// Author(s) : Sylvain Pion, Michael Hemmer, Alexander Kobel
|
||||
|
||||
#ifndef CGAL_RESIDUE_TYPE_H
|
||||
#define CGAL_RESIDUE_TYPE_H
|
||||
|
|
@ -227,8 +227,8 @@ public:
|
|||
}
|
||||
|
||||
//! constructor of Residue, from long
|
||||
Residue(long n){
|
||||
x_= RES_reduce((double)n);
|
||||
Residue (long n) {
|
||||
x_= RES_soft_reduce (static_cast< double > (n % get_prime_int()));
|
||||
}
|
||||
|
||||
//! Access operator for x, \c const
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
// Author(s) : Michael Hemmer
|
||||
// Author(s) : Michael Hemmer, Alexander Kobel
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/primes.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue