vvcross   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/math.xtm

Implementation

;; for 3d only SO NO LGTH
(bind-func vvcross
  (let ((i 0))
    (lambda (v1:float* v2:float* result:float*)
      (pfill! result
              (- (* (pref v1 1) (pref v2 2))
                 (* (pref v2 1) (pref v1 2)))
              (- (* (pref v2 0) (pref v1 2))
                 (* (pref v1 0) (pref v2 2)))
              (- (* (pref v1 0) (pref v2 1))
                 (* (pref v2 0) (pref v1 1))))
      void)))


Back to Index

Similar Entries