aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-02-08 07:53:18 -0800
committer3gg <3gg@shellblade.net>2024-02-08 07:53:18 -0800
commitc0d7fcbc6ca51fbe75e3597ae179bd056df9916d (patch)
tree0f3194b440f8ebf391f28d3bd09db4415aee0e7f /include
parent8145fbe95bebef9517dd3c864e07f96b60a4fcaf (diff)
Formatting.
Diffstat (limited to 'include')
-rw-r--r--include/math/mat4.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/math/mat4.h b/include/math/mat4.h
index f3601b6..bbe1a20 100644
--- a/include/math/mat4.h
+++ b/include/math/mat4.h
@@ -311,9 +311,13 @@ static inline mat4 mat4_ortho(R left, R right, R bottom, R top, R near, R far) {
311 const R tx = -(right + left) / (right - left); 311 const R tx = -(right + left) / (right - left);
312 const R ty = -(top + bottom) / (top - bottom); 312 const R ty = -(top + bottom) / (top - bottom);
313 const R tz = -(far + near) / (far - near); 313 const R tz = -(far + near) / (far - near);
314 // clang-format off
314 return mat4_make( 315 return mat4_make(
315 2 / (right - left), 0, 0, tx, 0, 2 / (top - bottom), 0, ty, 0, 0, 316 2 / (right - left), 0, 0, tx,
316 -2 / (far - near), tz, 0, 0, 0, 1); 317 0, 2 / (top - bottom), 0, ty,
318 0, 0, -2 / (far - near), tz,
319 0, 0, 0, 1);
320 // clang-format on
317} 321}
318 322
319/// Create a perspective projection matrix. 323/// Create a perspective projection matrix.