Skip to content

Instantly share code, notes, and snippets.

@cbaggers
Created December 7, 2017 18:37
Show Gist options
  • Save cbaggers/a60c2b494b1797f9f62f517ed15cc4b5 to your computer and use it in GitHub Desktop.
Save cbaggers/a60c2b494b1797f9f62f517ed15cc4b5 to your computer and use it in GitHub Desktop.
quaternion dot produce gpu function
(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