diff --git a/vcg/space/deprecated_point3.h b/vcg/space/deprecated_point3.h index 1e05d37c..08b71bff 100644 --- a/vcg/space/deprecated_point3.h +++ b/vcg/space/deprecated_point3.h @@ -326,8 +326,8 @@ public: // Normalizzazione inline Point3 & Normalize() { - P3ScalarType n = math::Sqrt(_v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2]); - if(n>0.0) { _v[0] /= n; _v[1] /= n; _v[2] /= n; } + P3ScalarType n = P3ScalarType(math::Sqrt(_v[0]*_v[0] + _v[1]*_v[1] + _v[2]*_v[2])); + if (n > P3ScalarType(0)) { _v[0] /= n; _v[1] /= n; _v[2] /= n; } return *this; }