diff options
Diffstat (limited to 'src/hitomezashi.rs')
-rw-r--r-- | src/hitomezashi.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hitomezashi.rs b/src/hitomezashi.rs index dede1ac..24a59be 100644 --- a/src/hitomezashi.rs +++ b/src/hitomezashi.rs @@ -34,7 +34,8 @@ pub fn hitomezashi(width: usize, height: usize, skew: Option<f64>) { let mut rng = rand::thread_rng(); let brn = Bernoulli::new(skew).unwrap(); - let init_bit: bool = rng.gen::<bool>(); + // the first square (upper left corner) is always transparent + let init_bit: bool = true; let mut row_bits: Vec<bool> = Vec::with_capacity(height - 1); let mut col_bits: Vec<bool> = Vec::with_capacity(width - 1); |