Browse Source

Small pedantic fixes.

vectorfields
Vladimír Vondruš 16 years ago
parent
commit
013bb7bd00
  1. 4
      src/Math/Matrix4.h
  2. 8
      src/Math/Vector3.h

4
src/Math/Matrix4.h

@ -101,7 +101,7 @@ template<class T> class Matrix4: public Matrix<T, 4> {
T sine = sin(angle); T sine = sin(angle);
T cosine = cos(angle); T cosine = cos(angle);
T oneMinusCosine = 1 - cosine; T oneMinusCosine = T(1) - cosine;
T xx = vn.x()*vn.x(); T xx = vn.x()*vn.x();
T xy = vn.x()*vn.y(); T xy = vn.x()*vn.y();
@ -110,7 +110,7 @@ template<class T> class Matrix4: public Matrix<T, 4> {
T yz = vn.y()*vn.z(); T yz = vn.y()*vn.z();
T zz = vn.z()*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 */ overwritten */
Matrix4 out(false); Matrix4 out(false);
out.set(3, 3, T(1)); out.set(3, 3, T(1));

8
src/Math/Vector3.h

@ -27,10 +27,10 @@ namespace Magnum { namespace Math {
template<class T> class Vector3: public Vector<T, 3> { template<class T> class Vector3: public Vector<T, 3> {
public: public:
/** @brief Cross product */ /** @brief Cross product */
static Vector3 cross(const Vector3& a, const Vector3& b) { static Vector3<T> cross(const Vector3<T>& a, const Vector3<T>& b) {
return Vector3(a[1]*b[2]-a[2]*b[1], return Vector3<T>(a[1]*b[2]-a[2]*b[1],
a[2]*b[0]-a[0]*b[2], a[2]*b[0]-a[0]*b[2],
a[0]*b[1]-a[1]*b[0]); a[0]*b[1]-a[1]*b[0]);
} }
/** @copydoc Vector::Vector */ /** @copydoc Vector::Vector */

Loading…
Cancel
Save