Fixed Perspective implementation.

This commit is contained in:
the_fiddler 2007-12-31 12:16:39 +00:00
parent 607c6b23aa
commit 408c66dd5d

View file

@ -379,7 +379,7 @@ namespace OpenTK.Math
/// <returns>A projection matrix that transforms camera space to raster space</returns>
public static Matrix4 Perspective(float fovy, float aspect, float near, float far)
{
float yMax = near * (float)System.Math.Tan(fovy);
float yMax = near * (float)System.Math.Tan(0.5f * fovy);
float yMin = -yMax;
float xMin = yMin * aspect;
float xMax = yMax * aspect;