From cc5ed5f4c307015325b5b5b3de50097a0ef404f2 Mon Sep 17 00:00:00 2001 From: nico Date: Mon, 3 Apr 2017 12:33:49 +0200 Subject: [PATCH] corrected one compilation issue about cast to scalar type --- vcg/complex/algorithms/update/quality.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/update/quality.h b/vcg/complex/algorithms/update/quality.h index b460102d..c8d88908 100644 --- a/vcg/complex/algorithms/update/quality.h +++ b/vcg/complex/algorithms/update/quality.h @@ -436,7 +436,7 @@ static void VertexSaturate(MeshType &m, ScalarType gradientThr=1.0) if(vc->Q() > qi) // first case: the center of the star has to be lowered (and re-inserted in the queue). { //printf("Reinserting center %i \n",vc - &*m.vert.begin()); - ScalarType delta=std::min(0.00001,distGeom/2); + ScalarType delta=std::min((ScalarType)0.00001,(ScalarType)distGeom/2.0); vc->Q() = qi+distGeom-delta; assert( distGeom > fabs(qi - vc->Q())); st.push(vc); @@ -447,7 +447,7 @@ static void VertexSaturate(MeshType &m, ScalarType gradientThr=1.0) // second case: you have to lower qi, the vertex under examination. assert( distGeom < fabs(qi - vc->Q())); assert(vc->Q() < qi); - ScalarType delta=std::min(0.00001,distGeom/2); + ScalarType delta=std::min((ScalarType)0.00001,(ScalarType)distGeom/2.0); float newQi = vc->Q() + distGeom -delta; assert(newQi <= qi); assert(vc->Q() < newQi);