]> git.tdb.fi Git - libs/gl.git/blobdiff - source/matrix.cpp
Always include glext.h
[libs/gl.git] / source / matrix.cpp
index 8cc9dcba3a513e49b5b7d9367bd3dae733e371ee..cac4a4fcd99afe6d2e110c80030aad39dd9352c1 100644 (file)
@@ -63,7 +63,7 @@ Vector4 Matrix::operator*(const Vector4 &vec) const
 
 Vector3 Matrix::operator*(const Vector3 &vec) const
 {
-       return Geometry::reduce_vector((*this)*Geometry::augment_vector(vec, 1.0f));
+       return Vector3((*this)*Vector4(vec, 1.0f));
 }
 
 double Matrix::operator[](unsigned i) const
@@ -140,9 +140,9 @@ Matrix Matrix::frustum_centered(double w, double h, double n, double f)
        return frustum(-w/2, w/2, -h/2, h/2, n, f);
 }
 
-Matrix Matrix::perspective(double h, double a, double n, double f)
+Matrix Matrix::perspective(const Angle &h, double a, double n, double f)
 {
-       double hh = tan(h/2)*n;
+       double hh = tan(h/2.0)*n;
        return frustum(-hh*a, hh*a, -hh, hh, n, f);
 }