Skip to content

Commit

Permalink
noise: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
PottierLoic committed Jul 23, 2024
1 parent 53c91c0 commit 4861581
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/noise_fractal_2d/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fn main() {
mut y := []f64{}
mut z := []f64{}

// 5 layers of simplex noise
octaves := 5
// 5 layers of simplex noise
octaves := 5
persistence := 0.5

for xx in 0 .. 200 {
Expand All @@ -26,7 +26,7 @@ fn main() {
mut amplitude := 1.0
mut max_value := 0.0

for _ in 0..octaves {
for _ in 0 .. octaves {
total += generator.simplex_2d(0.03 * xx * frequency, 0.03 * yy * frequency) * amplitude
max_value += amplitude
amplitude *= persistence
Expand Down

0 comments on commit 4861581

Please sign in to comment.