3d-matrices
3d-matrices copied to clipboard
N*M modifies more than the rightmost argument
(n*m mat1 mat2 vec)
modifies both mat2
and vec
instead of just vec
.
(let ((mat1 (mat 1 0 0 2))
(mat2 (mat 6 0 0 6))
(vec (vec 10 10)))
(n*m mat1 mat2 vec)
(values mat1 mat2 vec))
gives
(MAT2 #(1.0 0.0 0.0 2.0))
(MAT2 #(6.0 0.0 0.0 12.0))
(VEC2 60.0 120.0)
instead of
(MAT2 #(1.0 0.0 0.0 2.0))
(MAT2 #(6.0 0.0 0.0 6.0))
(VEC2 60.0 120.0)