cpTransformMult   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk/cpTransform.xtm

Implementation

(bind-func cpTransformMult
  (lambda (t1:cpTransform t2:cpTransform)
    (cpTransformNewTranspose
      (+ (* (tref t1 0) (tref t2 0)) (* (tref t1 2) (tref t2 1)))
      (+ (* (tref t1 0) (tref t2 2)) (* (tref t1 2) (tref t2 3)))
      (+ (* (tref t1 0) (tref t2 4)) (* (tref t1 2) (tref t2 5)) (tref t1 4))
      (+ (* (tref t1 1) (tref t2 0)) (* (tref t1 3) (tref t2 1)))
      (+ (* (tref t1 1) (tref t2 2)) (* (tref t1 3) (tref t2 3)))
      (+ (* (tref t1 1) (tref t2 4)) (* (tref t1 3) (tref t2 5)) (tref t1 5)))))


Back to Index