well that didn't work

This commit is contained in:
Simon Gardling
2021-04-01 01:44:54 -04:00
parent e163387755
commit c25b0d1795
4 changed files with 17 additions and 48 deletions

View File

@@ -88,8 +88,6 @@ pub struct Grid {
// Scratch space for the blur operation.
buf: Vec<f32>,
blur: Blur,
pub i: Vec<usize>,
}
impl Clone for Grid {
@@ -101,14 +99,13 @@ impl Clone for Grid {
data: self.data.clone(),
buf: self.buf.clone(),
blur: self.blur.clone(),
i: self.i.clone(),
}
}
}
impl Grid {
// Create a new grid filled with random floats in the [0.0..1.0) range.
pub fn new<R: Rng + ?Sized>(width: usize, height: usize, rng: &mut R, i: Vec<usize>) -> Self {
pub fn new<R: Rng + ?Sized>(width: usize, height: usize, rng: &mut R) -> Self {
if !width.is_power_of_two() || !height.is_power_of_two() {
panic!("Grid dimensions must be a power of two.");
}
@@ -122,7 +119,6 @@ impl Grid {
config: PopulationConfig::new(rng),
buf: vec![0.0; width * height],
blur: Blur::new(width),
i,
}
}