From 013bb7bd001c4db6e35459ea8f8279ed0bdc092b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 27 Dec 2010 18:16:03 +0100 Subject: [PATCH] Small pedantic fixes. --- src/Math/Matrix4.h | 4 ++-- src/Math/Vector3.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index e0e15c0f9..69d2119e3 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -101,7 +101,7 @@ template class Matrix4: public Matrix { T sine = sin(angle); T cosine = cos(angle); - T oneMinusCosine = 1 - cosine; + T oneMinusCosine = T(1) - cosine; T xx = vn.x()*vn.x(); T xy = vn.x()*vn.y(); @@ -110,7 +110,7 @@ template class Matrix4: public Matrix { T yz = vn.y()*vn.z(); T zz = vn.z()*vn.z(); - /* Don't creating identity matrix, as nearly all ones would be + /* Not creating identity matrix, as nearly all ones would be overwritten */ Matrix4 out(false); out.set(3, 3, T(1)); diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 9643eb286..e5f2469b2 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -27,10 +27,10 @@ namespace Magnum { namespace Math { template class Vector3: public Vector { public: /** @brief Cross product */ - static Vector3 cross(const Vector3& a, const Vector3& b) { - return Vector3(a[1]*b[2]-a[2]*b[1], - a[2]*b[0]-a[0]*b[2], - a[0]*b[1]-a[1]*b[0]); + static Vector3 cross(const Vector3& a, const Vector3& b) { + return Vector3(a[1]*b[2]-a[2]*b[1], + a[2]*b[0]-a[0]*b[2], + a[0]*b[1]-a[1]*b[0]); } /** @copydoc Vector::Vector */