mirror of https://github.com/CGAL/cgal
fix compilation of Mesh_2 with Homogeneous kernel
the example mesh_optimization.cpp fails during refinement with Kernel = CGAL::Homogeneous<double>
This commit is contained in:
parent
7e3af5cbda
commit
0ac4bf6493
|
|
@ -352,7 +352,7 @@ private:
|
||||||
sum += CGAL::sqrt(*it);
|
sum += CGAL::sqrt(*it);
|
||||||
|
|
||||||
#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
|
#ifdef CGAL_MESH_2_OPTIMIZER_VERBOSE
|
||||||
sum_moves_ = sum/big_moves_.size();
|
sum_moves_ = sum/FT(big_moves_.size());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ( sum/FT(big_moves_.size()) < convergence_ratio_ );
|
return ( sum/FT(big_moves_.size()) < convergence_ratio_ );
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ private:
|
||||||
typename Tr::Edge_circulator end = ec;
|
typename Tr::Edge_circulator end = ec;
|
||||||
|
|
||||||
FT sum_len(0.);
|
FT sum_len(0.);
|
||||||
FT nb = 0.;
|
unsigned int nb = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Edge e = *ec;
|
Edge e = *ec;
|
||||||
|
|
@ -187,7 +187,7 @@ private:
|
||||||
while(++ec != end);
|
while(++ec != end);
|
||||||
// nb == 0 could happen if there is an isolated point.
|
// nb == 0 could happen if there is an isolated point.
|
||||||
if( 0 != nb )
|
if( 0 != nb )
|
||||||
return sum_len/nb;
|
return sum_len/FT(nb);
|
||||||
else
|
else
|
||||||
// Use outside faces to compute size of point
|
// Use outside faces to compute size of point
|
||||||
return 1.;//todo
|
return 1.;//todo
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue