summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2024-06-06 10:12:23 +0200
committerRay <[email protected]>2024-06-06 10:12:23 +0200
commit38018192b8055024c4aa9b041943aa4e85bdd773 (patch)
treeb4c90c74a0654a2de414d9b394e8a05eadba0c10 /src
parent5767c4cd059e07355ae5588966d0aee97038a86b (diff)
downloadraylib-38018192b8055024c4aa9b041943aa4e85bdd773.tar.gz
raylib-38018192b8055024c4aa9b041943aa4e85bdd773.zip
RENAME: near, far vaiables
Diffstat (limited to 'src')
-rw-r--r--src/raymath.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/raymath.h b/src/raymath.h
index d036721a..8b69cbd5 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -1837,32 +1837,32 @@ RMAPI Matrix MatrixScale(float x, float y, float z)
}
// Get perspective projection matrix
-RMAPI Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far)
+RMAPI Matrix MatrixFrustum(double left, double right, double bottom, double top, double nearPlane, double farPlane)
{
Matrix result = { 0 };
float rl = (float)(right - left);
float tb = (float)(top - bottom);
- float fn = (float)(far - near);
+ float fn = (float)(farPlane - nearPlane);
- result.m0 = ((float)near*2.0f)/rl;
+ result.m0 = ((float)nearPlane*2.0f)/rl;
result.m1 = 0.0f;
result.m2 = 0.0f;
result.m3 = 0.0f;
result.m4 = 0.0f;
- result.m5 = ((float)near*2.0f)/tb;
+ result.m5 = ((float)nearPlane*2.0f)/tb;
result.m6 = 0.0f;
result.m7 = 0.0f;
result.m8 = ((float)right + (float)left)/rl;
result.m9 = ((float)top + (float)bottom)/tb;
- result.m10 = -((float)far + (float)near)/fn;
+ result.m10 = -((float)farPlane + (float)nearPlane)/fn;
result.m11 = -1.0f;
result.m12 = 0.0f;
result.m13 = 0.0f;
- result.m14 = -((float)far*(float)near*2.0f)/fn;
+ result.m14 = -((float)farPlane*(float)nearPlane*2.0f)/fn;
result.m15 = 0.0f;
return result;