Created
June 10, 2014 18:24
-
-
Save soegaard/b04d03c207d12a09031e to your computer and use it in GitHub Desktop.
Cross
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
(define (cross a b) | |
(match-define (vector a1 a2 a3) (matrix->vector a)) | |
(match-define (vector b1 b2 b3) (matrix->vector b)) | |
(matrix [[(- (* a2 b3) (* a3 b2))] | |
[(- (* a3 b1) (* a1 b3))] | |
[(- (* a1 b2) (* a2 b1))]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment