While making toy project, found out 1-dimensional Perlin noise was broken in negative range.
example:
#[test]
fn perlin_test() {
let perlin = Perlin::new(69420);
for i in -9..10 {
let t = i as f64 / 10.0;
let val = perlin.get([t]);
println!("{:.2}: {:.2}", t, val);
}
}
While making toy project, found out 1-dimensional Perlin noise was broken in negative range.
example:
before fix:
after fix: