Skip to content

FastNoise::seeded() creates 0 noise #343

@walles

Description

@walles

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions