diff --git a/library/PolyVoxCore/include/PolyVoxCore/Vector.inl b/library/PolyVoxCore/include/PolyVoxCore/Vector.inl index b6d92c15..f550a6ec 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Vector.inl +++ b/library/PolyVoxCore/include/PolyVoxCore/Vector.inl @@ -602,15 +602,15 @@ namespace PolyVox template inline void Vector::normalise(void) throw() { - double length = this->length(); + Type tLength = this->length(); //FIXME - throw div by zero exception? - if(length < 0.0001f) + if(tLength < 0.0001f) { return; } for(uint32_t ct = 0; ct < Size; ++ct) { - m_tElements[ct] /= static_cast(length); + m_tElements[ct] /= tLength; } } }//namespace PolyVox