-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
p5.Vector reflect() unexpectedly modifies surface normal argument #7088
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you! |
I'd like to contribute a fix and regression tests, if it turns out that that's wanted! Looks like the code has been this way since addition of the functions in v1.0.0 |
nbogie
added a commit
to nbogie/p5.js
that referenced
this issue
Jun 23, 2024
3 tasks
limzykenneth
added a commit
that referenced
this issue
Jun 24, 2024
Fix vector reflect() mutating surface normal arg (#7088)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most appropriate sub-area of p5.js?
p5.js version
1.9.4
Web browser and version
all
Operating system
all
Steps to reproduce this
Snippet:
Expected behaviour:
I'd expect the surface normal argument to be unchanged by the calculation, in both instance and static cases.
Actual behaviour:
The surface normal argument is mutated during the calculation, in both instance and static cases.
Misc:
Here's a (simplification of a) real usage where the bug caught me out: https://openprocessing.org/sketch/2295422
The text was updated successfully, but these errors were encountered: