const Vector3& Vector3::Normalize() { double length2 = GetLengthSquared(); if (math::NearZero((float)length2)) { SD_ERROR_MSG("Division by zero!"); return *this; } // Not need to normalize if(length2 == 1.0f) return *this; return (*this /= (float)sqrt(length2)); }
Scalar GetApproximateLength() const { Check_Object(this); return SqrtApproximate(static_cast<Scalar>(GetLengthSquared())); }
Scalar GetLength() const {return Sqrt(GetLengthSquared());}
Scalar GetApproximateLength() const {return SqrtApproximate(GetLengthSquared());}
void Quaternion::Invert() { Conjugate(); *this /= GetLengthSquared(); }