diff --git a/vcg/complex/local_optimization/tri_edge_flip.h b/vcg/complex/local_optimization/tri_edge_flip.h index 0fc3c9b8..5ee7d2c5 100644 --- a/vcg/complex/local_optimization/tri_edge_flip.h +++ b/vcg/complex/local_optimization/tri_edge_flip.h @@ -239,7 +239,7 @@ public: ScalarType QbAfter = QualityFunc(v0, v3, v2); // < 0 if the average quality of faces improves after flip - _priority = (Qa + Qb - QaAfter - QbAfter) / 2.0; + _priority = (Qa + Qb - QaAfter - QbAfter) / (ScalarType)2.0; return _priority; }