Skip to content
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

Definition of output ranges. #206

Open
cheako opened this issue Mar 28, 2019 · 3 comments
Open

Definition of output ranges. #206

cheako opened this issue Mar 28, 2019 · 3 comments

Comments

@cheako
Copy link

cheako commented Mar 28, 2019

https://docs.rs/noise/0.5.1/noise/struct.OpenSimplex.html does not specify it's output range, I only knew to look when I was getting negative numbers. Looks like it's -1 to 1, not sure if it's inclusive or not. These are the kinds of things that:

  1. Should be consistent about, get() for all NoiseFns should produce the same rage, I suggest -1 to 1 inclusive or 0(exclusive) to 1(inclusive).
  2. Should be well documented, even if there are no notations about compliance it should be explicitly stated in the docs. This assumes some implementations won't, for example, be able to get all the way to 1.
@vallentin
Copy link
Contributor

Testing, I'm getting the range [-0.5; 0.5]. I'd also like if this information was added to the documentation.

Additionally, it would be great if there was a Range trait. That all the noise algorithms implemented. Even better if it is also implemented for the various noise functions. Such that Min, Power, etc. would correctly scale the min() and max() relative to their operation and the min/max of the source(s).

@cheako
Copy link
Author

cheako commented Jul 30, 2019

Affirmative, having undefined behavior leads to different algorithms being undefined in different and often incompatible ways.

@jrmoserbaltimore
Copy link

This is exactly why I'm here, I have no idea what the output range is supposed to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants