From 4047c0d0a92eae8a7394b4caa479d0cb6dd9017c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 24 Oct 2022 17:17:50 -0400 Subject: math: matrix: Add copy procedures. --- doc/api.texi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc') diff --git a/doc/api.texi b/doc/api.texi index e51a81d..9d743b4 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -1023,6 +1023,14 @@ equivalent to the following code: Return @code{#t} if @var{obj} is a 3x3 matrix. @end deffn +@deffn {Procedure} matrix3= m1 m2 +Return @code{#t} if @var{m1} is the same matrix as @var{m2}. +@end deffn + +@deffn {Procedure} matrix3-copy matrix +Return a new 3x3 matrix that is a copy of @var{matrix}. +@end deffn + @deffn {Procedure} matrix3* . matrices Return a new 3x3 matrix containing the product of multiplying all of the given @var{matrices}. @@ -1057,6 +1065,10 @@ Return the inverse of @var{matrix}. The following procedures perform in-place, destructive updates to 3x3 matrix objects: +@deffn {Procedure} matrix3-copy! src dest +Copy the contents of matrix @var{src} to @var{dest}. +@end deffn + @deffn {Procedure} matrix3-identity! matrix Modify @var{matrix} in-place to contain the identity matrix. @end deffn @@ -1124,6 +1136,14 @@ equivalent to the following code: Return @code{#t} if @var{obj} is a 4x4 matrix. @end deffn +@deffn {Procedure} matrix4= m1 m2 +Return @code{#t} if @var{m1} is the same matrix as @var{m2}. +@end deffn + +@deffn {Procedure} matrix4-copy matrix +Return a new 4x4 matrix that is a copy of @var{matrix}. +@end deffn + @deffn {Procedure} matrix4* . matrices Return a new 4x4 matrix containing the product of multiplying all of the given @var{matrices}. @@ -1175,6 +1195,13 @@ Return a new 4x4 matrix that represents a rotation about the Z axis by @var{theta} radians. @end deffn +The following procedures perform in-place, destructive updates to 4x4 +matrix objects: + +@deffn {Procedure} matrix4-copy! src dest +Copy the contents of matrix @var{src} to @var{dest}. +@end deffn + @deffn {Procedure} matrix4-identity! matrix Modify @var{matrix} in-place to contain the identity matrix. @end deffn -- cgit v1.2.3