diff --git a/src/main.rs b/src/main.rs index 7344996..5791fdb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ fn main() { let cli = Cli::parse(); let mut sys = DLASystem::::new( - cli.seed, + SmallRng::seed_from_u64(cli.seed), cli.max_particles, cli.stick_probability ); diff --git a/src/system/model.rs b/src/system/model.rs index a50e63a..7bad802 100644 --- a/src/system/model.rs +++ b/src/system/model.rs @@ -28,9 +28,9 @@ pub struct DLASystem> { } impl> DLASystem { - pub fn new(seed: u64, max_particles: usize, stick_probability: f32) -> DLASystem { + pub fn new(rng: R, max_particles: usize, stick_probability: f32) -> DLASystem { let mut sys: DLASystem = DLASystem { - rng: SmallRng::seed_from_u64(seed), + rng, stick_probability, max_particles, running: true,