Razaekel / noise-rs

Procedural noise generation library for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Perlin noise always returns 0 on whole numbers

doonv opened this issue · comments

I don't know what I am doing wrong but perlin noise always returns zero on whole numbers:

let noise = noise::Perlin::new(123578);

println!("{}", noise.get([2.0, 1.0]));
println!("{}", noise.get([2.0, 124.0]));
println!("{}", noise.get([2.0, 12.0]));

// With decimals:
println!("{}", noise.get([2.3, 12.1]));

Which results in:

0
0
0
0.33866112622786926

Is this intended behavior? I don't think so.

Yes, it is the intended behaviour. More info here.

Yes, it is the intended behaviour. More info here.

Ah thanks, you should add that to the documentation.