Math.noise bounds are not correct

The documentation for math.noise states that it will return a number between -0.5 and 0.5. However, this is not true. Sometimes, the result will be slightly outside of those bounds. For instance, math.noise(9.9, 9.6) will return -0.50271731615067. Clearly, that’s out of bounds.

Now this issue was brought up 4 years ago. @zeuxcg’s response to the thread makes it sound like these bounds are not correctly documented.

So what should the bounds be? I don’t know.


This is important to document, because developers need to know that they need to explicitly clamp the noise value between -0.5 and 0.5 to properly use the value for clean data.

7 Likes

2 posts were merged into an existing topic: Developer Hub erroneously reports that math.noise should be in 0.5 to -0.5 range

Duplicate topic, moved to original one