Skip to content

Instantly share code, notes, and snippets.

@gszauer
Last active December 19, 2017 09:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gszauer/175a474dbbf0ff2d01db197f665f3dc8 to your computer and use it in GitHub Desktop.
Save gszauer/175a474dbbf0ff2d01db197f665f3dc8 to your computer and use it in GitHub Desktop.
Cross Product XYZ Pattern

Step 1

List result xyz top to bottom

result.x =
result.y = 
result.z = 

Step 2

Fill out xyz pattern left to right

result.x = a.y * b.z
// Repeat xyz pattern
result.y = a.z * b.x
result.z = a.x * b.y

Step 3

Flip the right side of the equation, subtracting it

result.x = a.y * b.z - a.z * b.y
result.y = a.z * b.x - a.x * b.z
result.z = a.x * b.y - a.y * b.x
@noblekoshy
Copy link

thanks! This will help me in my EE physics class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment