corrected one compilation issue about cast to scalar type

This commit is contained in:
nico 2017-04-03 12:33:49 +02:00
parent 9a20565687
commit cc5ed5f4c3
1 changed files with 2 additions and 2 deletions

View File

@ -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). 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()); //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; vc->Q() = qi+distGeom-delta;
assert( distGeom > fabs(qi - vc->Q())); assert( distGeom > fabs(qi - vc->Q()));
st.push(vc); 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. // second case: you have to lower qi, the vertex under examination.
assert( distGeom < fabs(qi - vc->Q())); assert( distGeom < fabs(qi - vc->Q()));
assert(vc->Q() < qi); 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; float newQi = vc->Q() + distGeom -delta;
assert(newQi <= qi); assert(newQi <= qi);
assert(vc->Q() < newQi); assert(vc->Q() < newQi);