diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index ccc2e228f..f95f8225d 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -502,7 +502,7 @@ NzMatrix4& NzMatrix4::MakeLookAt(const NzVector3& eye, const NzVector3< template NzMatrix4& NzMatrix4::MakePerspective(T angle, T ratio, T zNear, T zFar) { - // http://msdn.microsoft.com/en-us/library/windows/desktop/bb204944(v=vs.85).aspx + // http://msdn.microsoft.com/en-us/library/windows/desktop/bb204945(v=vs.85).aspx #if NAZARA_MATH_ANGLE_RADIAN angle /= F(2.0); #else diff --git a/include/Nazara/Math/Vector3.inl b/include/Nazara/Math/Vector3.inl index acaf98694..c03d1dd53 100644 --- a/include/Nazara/Math/Vector3.inl +++ b/include/Nazara/Math/Vector3.inl @@ -157,8 +157,8 @@ NzVector3& NzVector3::Maximize(const NzVector3& vec) if (vec.y > y) y = vec.y; - if (vec.z > z) - z = vec.z; + if (vec.z > z) + z = vec.z; return *this; } @@ -172,8 +172,8 @@ NzVector3& NzVector3::Minimize(const NzVector3& vec) if (vec.y < y) y = vec.y; - if (vec.z < z) - z = vec.z; + if (vec.z < z) + z = vec.z; return *this; } @@ -181,7 +181,7 @@ NzVector3& NzVector3::Minimize(const NzVector3& vec) template NzVector3& NzVector3::Normalize(T* length) { - T norm = std::sqrt(SquaredLength()); + T norm = Length(); T invNorm = F(1.0) / norm; x *= invNorm;