Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why the exclusive or ? #52

Closed
bangclash opened this issue Aug 1, 2020 · 1 comment
Closed

why the exclusive or ? #52

bangclash opened this issue Aug 1, 2020 · 1 comment

Comments

@bangclash
Copy link

Sorry if this is the wrong place to ask this. I'm on lesson 2. I'm porting the lessons to C# to try to understand the theory better. The following line of code confuses me. I understand it's using an exclusive or but why is it doing this? What is the logic behind this so I can port this to C#. Thank you.

Vec3f n = (world_coords[2]-world_coords[0])^(world_coords[1]-world_coords[0]);

@ssloy
Copy link
Owner

ssloy commented Aug 1, 2020

This is an overloaded operator for cross product. In later commits it is superseded by cross(Vec3f v1, Vec3f v2) function.
The wedge notation is standard in french school, I thought it was common enough. But it confuses peope, so it was removed.

@ssloy ssloy closed this as completed Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants