From 565bc5edfe8cddd49d2031ba6a8c96be9b8b208b Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 17 May 2021 05:45:55 +0200 Subject: [PATCH] Presentation Matrix4f --- src/engine/math/Matrix4f.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/math/Matrix4f.java b/src/engine/math/Matrix4f.java index f8be361..7e32c00 100644 --- a/src/engine/math/Matrix4f.java +++ b/src/engine/math/Matrix4f.java @@ -28,11 +28,11 @@ public class Matrix4f { public static Matrix4f orthographic(float left, float right, float bottom, float top, float near, float far){ Matrix4f result = identity(); - result.elements[0] = 2.0f / (right - left); - result.elements[1 + 4] = 2.0f / (top - bottom); + result.elements[0 + 0 * 4] = 2.0f / (right - left); + result.elements[1 + 1 * 4] = 2.0f / (top - bottom); result.elements[2 + 2 * 4] = 2.0f / (near - far); - result.elements[3 * 4] = (left + right) / (left - right); + result.elements[0 + 3 * 4] = (left + right) / (left - right); result.elements[1 + 3 * 4] = (bottom + top) / (bottom - top); result.elements[2 + 3 * 4] = (far + near) / (far - near);