3d-matrices icon indicating copy to clipboard operation
3d-matrices copied to clipboard

N*M modifies more than the rightmost argument

Open lovrolu opened this issue 6 years ago • 0 comments

(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)

lovrolu avatar Jun 03 '18 19:06 lovrolu