diff --git a/Cargo.toml b/Cargo.toml index 7a2a0dfa..301287bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,12 +34,12 @@ transform-types = [] # TODO: make this dev only approx = { version = "0.3", optional = true, default-features = false } mint = { version = "0.5", optional = true, default-features = false } -rand = { version = "0.6", optional = true } +rand = { version = "0.7", optional = true, default-features = false } serde = { version = "1.0", optional = true, features = ["derive"] } [dev-dependencies] -criterion = "0.2" -rand_xoshiro = "0.1" +criterion = "0.3" +rand_xoshiro = "0.4" serde_json = "1.0" [[bench]] diff --git a/tests/angle.rs b/tests/angle.rs index 91be11bb..7c9926a0 100644 --- a/tests/angle.rs +++ b/tests/angle.rs @@ -1,6 +1,10 @@ use approx::assert_ulps_eq; use glam::f32::{deg, rad, Angle}; use std::f32::consts; +#[cfg(feature = "rand")] +use rand::{Rng, SeedableRng}; +#[cfg(feature = "rand")] +use rand_xoshiro::Xoshiro256Plus; #[test] fn test_angle() { @@ -47,8 +51,7 @@ fn test_angle() { #[cfg(feature = "rand")] #[test] fn test_angle_rnd() { - use rand::Rng; - let mut rng = rand::thread_rng(); + let mut rng = Xoshiro256Plus::seed_from_u64(0); let a: Angle = rng.gen(); assert!(a >= rad(0.0)); assert!(a < rad(std::f32::consts::PI * 2.0));