diff options
author | David Thompson <dthompson2@worcester.edu> | 2022-08-03 17:06:53 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2022-08-03 17:06:53 -0400 |
commit | f75b06869606036099a531bb0f54a0e3826b6272 (patch) | |
tree | 7b8e45b009674adb0521b6a7d378852b2ecd4ae4 /doc | |
parent | 25324ed9d597f1ca9296ef872d9c4913c76dab43 (diff) |
math: matrix: Add matrix4-inverse and matrix4-inverse! procedures.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api.texi b/doc/api.texi index 9afc853..bebef33 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -1134,6 +1134,13 @@ the given @var{matrices}. Note: Remember that matrix multiplication is @strong{not} commutative! @end deffn +@deffn {Procedure} matrix4-inverse matrix +Return the inverse of @var{matrix}. + +A matrix multiplied by its inverse is the identity matrix, thought not +always exactly due to the nature of floating point numbers. +@end deffn + @deffn {Procedure} orthographic-projection left right top bottom near far Return a new 4x4 matrix that represents an orthographic (2D) @@ -1180,6 +1187,11 @@ Multiply the 4x4 matrix @var{a} by the 4x4 matrix @var{b} and store the result in the 4x4 matrix @var{dest}. @end deffn +@deffn {Procedure} matrix4-inverse! matrix target +Compute the inverse of @var{matrix} and store the result in +@var{target}. +@end deffn + @deffn {Procedure} matrix4-translate! matrix x Modify @var{matrix} in-place to contain a translation by @var{x}, a 2D vector, a 3D vector, or a rectangle (in which case the bottom-left |