-
Notifications
You must be signed in to change notification settings - Fork 893
noise(x, y) always return 0.46875 #241
Comments
Looks like it has to do with |
@teo1978 Thanks, it is wired though, still a bug ... besides even change it to |
Of course! I have no idea whether the values generated by processing.js make some sense (I mean, if they are valid Perlin noise according to a different "scale" or whatever) or if it's completely broken. But either way, as long as it does not generate exactly the same values as the Java version for any given input and seed, it's of course a bug. |
They should make sense, since they're proper Perlin noise, but it's possible that there are subtle bugs in the implementation on processing-js/src/P5Functions/Math.js Line 612 in c2b1466
processing-js/src/P5Functions/Math.js Lines 509 to 577 in c2b1466
The code given uses
These seem likely culprits:
After all, if the inputs are integer then the result of this is always going to be the same as |
@GoToLoop I've removed our comments that were veering off topic, as they contributed nothing to this specific bug report. As always, if you want to discuss the structure of the Processing.js project, its development process, what is missing, and how Pjs ties into Processing itself (short version: it doesn't), feel free to file one or more separate new issues for that. This issue is for tracking a bug in the code for |
The java version works well, but the js version, everytime call noise(x, y), it returns 0.46875
Run it here : http://sketchpad.cc/sp/pad/view/mPI5P5i6so/latest
The text was updated successfully, but these errors were encountered: