From ebcbc5f98d3e7f4d6a00f2a0036a1fef58beafa6 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Fri, 13 Nov 2009 00:52:37 +0000 Subject: [PATCH] fixed implicit cast warning. --- vcg/space/deprecated_point3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }