cpvrotate   xtlang


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

Implementation

(bind-func cpvrotate
  (lambda (v1:cpVect v2:cpVect)
    (cpVect_val
      (- (* (tref v1 0) (tref v2 0)) (* (tref v1 1) (tref v2 1)))
      (+ (* (tref v1 0) (tref v2 1)) (* (tref v1 1) (tref v2 0))))))


Back to Index