Skip to content

Commit

Permalink
errors
Browse files Browse the repository at this point in the history
  • Loading branch information
PottierLoic committed Jan 4, 2024
1 parent 604af08 commit bac656d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noise/perlin2d.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import rand

pub struct Perlin {
mut:
perm []int = rand.shuffle_clone(permutations) or { permutations }
perm []int = rand.shuffle_clone(permutations) or { panic(err) }
}

// randomize is a function that shuffle the permutation set inside the Perlin struct
// will not shuffle if rand.seed is not changed
pub fn (mut perlin Perlin) randomize() {
perlin.perm = rand.shuffle_clone(permutations) or { permutations }
perlin.perm = rand.shuffle_clone(permutations) or { panic(err) }
}

// perlin2d is a function that return a single value of perlin noise for a given 2d position
Expand Down

0 comments on commit bac656d

Please sign in to comment.