-
Notifications
You must be signed in to change notification settings - Fork 852
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
Array out of range #396
Comments
Original code was:
Current code (master; no changes in development branch) is:
We lost the scaling by four, plus selection of the lower 8 bits, which handled negative values. Need to track down the evolution of this code. |
Well … that was fun. I had to go back to the archives for the original repository for The Next Week. All changes are in the new unified repository, but the combination of multiple streams of development makes tracking down the code development for this chunk non-trivial. Anyway, this code has been broken from the very start in the repo when I first introduced it in commit d1ecb9d, in 2019-07-28. It was basically a transcription error on my part, and I'm a bit surprised that no-one's reported it until now (thank you @oxine!). Will fix for upcoming v3.0.0 release. |
For the record, my original (bad) transcription was:
|
@oxine — can you verify the following works? Thanks.
|
The original code for the first version of the Perlin noise() function in _The Next Week_ was incorrect. This returns the code to the original behavior, but using static_cast instead of the original C-style cast. Resolves #396
Verified,now it works well. |
raytracing.github.io/books/RayTracingTheNextWeek.html
Line 1099 in 00d0ab0
i j k can be minus value so would leads to error
The text was updated successfully, but these errors were encountered: