mirror of https://github.com/CGAL/cgal
fix min/max problem
This commit is contained in:
parent
304206a323
commit
83ce38c57f
|
|
@ -47,7 +47,10 @@ struct Random_convex_set_traits_2 {
|
|||
{
|
||||
FT
|
||||
operator()( const Point_2& p) const
|
||||
{ return max( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y())); }
|
||||
{
|
||||
BOOST_USING_STD_MAX();
|
||||
return max BOOST_PREVENT_MACRO_SUBSTITUTION ( CGAL_NTS abs( p.x()), CGAL_NTS abs( p.y()));
|
||||
}
|
||||
};
|
||||
|
||||
struct Sum
|
||||
|
|
|
|||
|
|
@ -201,10 +201,13 @@ public:
|
|||
// distributed on the segment from p to q except q, i.e. `*g' ==
|
||||
// \lambda p + (1-\lambda)\, q where 0 <= \lambda < 1 . A single
|
||||
// random number is needed from `rnd' for each point.
|
||||
: Random_generator_base<P>( max( max( to_double(p.x()), to_double(q.x())),
|
||||
max( to_double(p.y()),
|
||||
to_double(q.y()))),
|
||||
rnd) , _p(p), _q(q) {
|
||||
: Random_generator_base<P>( max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( to_double(p.x()), to_double(q.x())),
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( to_double(p.y()),
|
||||
to_double(q.y()))),
|
||||
rnd) , _p(p), _q(q) {
|
||||
generate_point();
|
||||
}
|
||||
const P& source() const { return _p; }
|
||||
|
|
@ -244,9 +247,12 @@ public:
|
|||
Points_on_segment_2() {}
|
||||
Points_on_segment_2( const P& p, const P& q,
|
||||
std::size_t mx, std::size_t i = 0)
|
||||
: Generator_base<P>( max( max( to_double(p.x()), to_double(q.x())),
|
||||
max( to_double(p.y()), to_double(q.y())))),
|
||||
_p(p), _q(q), d_i(i), d_mx(mx) {
|
||||
: Generator_base<P>( max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( to_double(p.x()), to_double(q.x())),
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
( to_double(p.y()), to_double(q.y())))),
|
||||
_p(p), _q(q), d_i(i), d_mx(mx) {
|
||||
generate_point();
|
||||
}
|
||||
const P& source() const { return _p; }
|
||||
|
|
|
|||
Loading…
Reference in New Issue