fixed implicit cast warning.

This commit is contained in:
Marco Di Benedetto 2009-11-13 00:52:37 +00:00
parent 70ae4d5c50
commit ebcbc5f98d
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}