Created
December 7, 2017 18:37
-
-
Save cbaggers/a60c2b494b1797f9f62f517ed15cc4b5 to your computer and use it in GitHub Desktop.
quaternion dot produce gpu function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun-g q:dot ((quat-a :vec4) (quat-b :vec4)) | |
(+ (* (w quat-a) (w quat-b)) | |
(* (x quat-a) (x quat-b)) | |
(* (y quat-a) (y quat-b)) | |
(* (z quat-a) (z quat-b)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment