jwagner / simplex-noise.js

A fast simplex noise implementation in Javascript / Typescript.
MIT License
1.61k stars 130 forks source link

Add note to readme about `-1` to `1` #55

Closed ianstormtaylor closed 1 year ago

ianstormtaylor commented 1 year ago

Thanks for this great library!

I think it would be helpful to add a note to the readme mentioning that the values returned are between -1 and 1, for the case where people don't remember and want to check quickly. I verified this currently by just looking at the test files.

Since P5.js returns values between 0 and 1 (which seems weirder?) I always forget which is the right way to do it.

jwagner commented 1 year ago

It's already in the API docs https://29a.ch/simplex-noise/docs/types/NoiseFunction2D.html which should also show up in most IDEs. But can't hurt to add it to the README as well.

Thanks for the suggestion, I've implemented it in 9dcde15c49aa67a55505e733123a439476ed9cd4 :)