Move RNG gen to elsewhere
This commit is contained in:
parent
0752370ee7
commit
fcda9726d5
@ -30,7 +30,7 @@ fn main() {
|
||||
let cli = Cli::parse();
|
||||
|
||||
let mut sys = DLASystem::<SmallRng, VectorStorage, LocalRandomWalker>::new(
|
||||
cli.seed,
|
||||
SmallRng::seed_from_u64(cli.seed),
|
||||
cli.max_particles,
|
||||
cli.stick_probability
|
||||
);
|
||||
|
||||
@ -28,9 +28,9 @@ pub struct DLASystem<R: Rng, S: Storage, W: Walker<R>> {
|
||||
}
|
||||
|
||||
impl<R: Rng, S: Storage, W: Walker<R>> DLASystem<R, S, W> {
|
||||
pub fn new(seed: u64, max_particles: usize, stick_probability: f32) -> DLASystem<SmallRng, VectorStorage, LocalRandomWalker> {
|
||||
pub fn new(rng: R, max_particles: usize, stick_probability: f32) -> DLASystem<R, VectorStorage, LocalRandomWalker> {
|
||||
let mut sys: DLASystem<SmallRng, VectorStorage, LocalRandomWalker> = DLASystem {
|
||||
rng: SmallRng::seed_from_u64(seed),
|
||||
rng,
|
||||
stick_probability,
|
||||
max_particles,
|
||||
running: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user