Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 0bdb3bb

Browse files
authored
Fixes cellular noise not working for diff height and width values (tgstation#117)
1 parent 7bb6cf8 commit 0bdb3bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cellularnoise.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ fn noise_gen(
2222
let width = width_as_str.parse::<usize>()?;
2323
let height = height_as_str.parse::<usize>()?;
2424
//we populate it, from 0 to height+3, 0 to height+1 is exactly height long, but we also need border guards, so we add another +2, so it is 0..height+3
25-
let mut filled_vec = (0..height + 3)
25+
let mut filled_vec = (0..width + 3)
2626
.into_par_iter()
2727
.map(|x| {
2828
let mut rng = rand::thread_rng();
29-
(0..width + 3)
29+
(0..height + 3)
3030
.into_iter()
3131
.map(|y| {
3232
if x == 0 || y == 0 || x == width + 2 || y == height + 2 {

0 commit comments

Comments
 (0)