Skip to content

Commit

Permalink
Use SmallRng in simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 9, 2023
1 parent c8e38c0 commit 2203c5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ use std::f32::consts::TAU;

use bevy::ecs::event::ManualEventReader;
use bevy::prelude::*;
use rand::thread_rng;
use rand::rngs::SmallRng;
use rand::Rng;
use rand::SeedableRng;

use crate::physics::Velocity;
pub use crate::simulation::sprite_pack::SkinSet;
Expand Down Expand Up @@ -179,7 +180,7 @@ fn spawn_entities(
}
}

let mut rng = thread_rng();
let mut rng = SmallRng::from_entropy();
for event in reader
.read(world.resource::<Events<_>>())
.copied()
Expand Down

0 comments on commit 2203c5b

Please sign in to comment.