Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this is properly called "mathematical" reflection. From what I can see, "n" is always the normal vector (i.e. pointing perpendicular from the surface). While in this case "n" is not the normal, but the plane itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little more insight, the wikipedia page for "reflection (mathematics)" gives a definition for reflection the same as what we use for reflection, but calls the parameter "line" instead of "normal". (https://en.wikipedia.org/wiki/Reflection_(mathematics))
Bounce on the other hand, is a mathematical reflection over a normal. It is also equivalent to
-vec.reflect()
Instead of calling them "mathematical reflection" and "physical reflection" I would highlight that you are reflecting over a normal vector perpendicular to the plane, or a vector describing the plane itself. So you are either "bouncing off a surface with normal n" or you are "reflecting across the surface n"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that what
bounce()
does?