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

FastNoise::seeded() creates 0 noise #343

Open
walles opened this issue Jun 30, 2023 · 0 comments
Open

FastNoise::seeded() creates 0 noise #343

walles opened this issue Jun 30, 2023 · 0 comments

Comments

@walles
Copy link

walles commented Jun 30, 2023

Setting frequency to 0.0 in FastNoise::seeded()...

... ensures we don't get any noise:

pub fn get_noise3d(&self, mut x: f32, mut y: f32, mut z: f32) -> f32 {
x *= self.frequency;
y *= self.frequency;
z *= self.frequency;

Maybe it should be initialized to 1.0 just like for new?

pub fn new() -> FastNoise {
let mut noise = FastNoise {
rng: RandomNumberGenerator::seeded(1337),
seed: 1337,
frequency: 1.0,

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

1 participant