From 408c66dd5d51b3d02b35cd95a2a881e08ce8a485 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 31 Dec 2007 12:16:39 +0000 Subject: [PATCH] Fixed Perspective implementation. --- Source/OpenTK/Math/Matrix4.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/Math/Matrix4.cs b/Source/OpenTK/Math/Matrix4.cs index ee390329..d46ad29e 100644 --- a/Source/OpenTK/Math/Matrix4.cs +++ b/Source/OpenTK/Math/Matrix4.cs @@ -379,7 +379,7 @@ namespace OpenTK.Math /// A projection matrix that transforms camera space to raster space 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;