summaryrefslogtreecommitdiffhomepage
path: root/src/raymath.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-07-21 10:42:41 +0200
committerraysan5 <[email protected]>2017-07-21 10:42:41 +0200
commit84aff31973667e6bec29915d60971f9a5bb02a44 (patch)
treee2a342e06add71caaa93884c9878899a7302b5f4 /src/raymath.h
parent163339991c48241e64b63031093799bb613f086a (diff)
downloadraylib-84aff31973667e6bec29915d60971f9a5bb02a44.tar.gz
raylib-84aff31973667e6bec29915d60971f9a5bb02a44.zip
MatrixPerspective() angle required in radians
Consistent with similar functions in raymath
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/raymath.h b/src/raymath.h
index c4db0f3f..70d1bedd 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -873,9 +873,10 @@ RMDEF Matrix MatrixFrustum(double left, double right, double bottom, double top,
}
// Returns perspective projection matrix
+// NOTE: Angle should be provided in radians
RMDEF Matrix MatrixPerspective(double fovy, double aspect, double near, double far)
{
- double top = near*tan(fovy*PI/360.0);
+ double top = near*tan(fovy);
double right = top*aspect;
return MatrixFrustum(-right, right, -top, top, near, far);