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
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);
}