From 0a0f1fa6eac214c081fdb681b3d27e2137f308c0 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Fri, 8 Jan 2021 09:22:02 -0800 Subject: [PATCH] Sometimes top > bottom and sometimes bottom > top depending on drawing mode. Change ortho div by zero check for a simple equality. We don't care what the numbers are just so long as they are not the same in any axis. --- src/rlgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rlgl.h b/src/rlgl.h index 8d0dc373e..28a271f73 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -1100,7 +1100,7 @@ void rlFrustum(double left, double right, double bottom, double top, double znea // Multiply the current matrix by an orthographic matrix generated by parameters void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar) { - if (((right - left) > 0) && ((top - bottom) > 0)) + if (right != left && top != bottom) // prevent divide by 0 { Matrix matOrtho = MatrixOrtho(left, right, bottom, top, znear, zfar); *RLGL.State.currentMatrix = MatrixMultiply(*RLGL.State.currentMatrix, matOrtho);