diff --git a/Cargo.toml b/Cargo.toml index f80c5f79..47c3efe9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,21 +28,22 @@ alloc = [ ] [dependencies] typenum = "1.10" -generic-array = "0.11" -rand = { version = "0.5", default-features = false } +generic-array = "0.12" +rand = { version = "0.6", default-features = false } num-traits = { version = "0.2", default-features = false } num-complex = { version = "0.2", default-features = false } approx = { version = "0.3", default-features = false } alga = { version = "0.7", default-features = false } -matrixmultiply = { version = "0.1", optional = true } +matrixmultiply = { version = "0.2", optional = true } serde = { version = "1.0", optional = true } serde_derive = { version = "1.0", optional = true } -abomonation = { version = "0.5", optional = true } +abomonation = { version = "0.7", optional = true } mint = { version = "0.5", optional = true } -quickcheck = { version = "0.6", optional = true } +quickcheck = { version = "0.7", optional = true } [dev-dependencies] serde_json = "1.0" +rand_xorshift = "0.1" [workspace] members = [ "nalgebra-lapack", "nalgebra-glm" ] diff --git a/nalgebra-lapack/Cargo.toml b/nalgebra-lapack/Cargo.toml index e21891c1..c59211ab 100644 --- a/nalgebra-lapack/Cargo.toml +++ b/nalgebra-lapack/Cargo.toml @@ -34,6 +34,6 @@ lapack-src = { version = "0.2", default-features = false } [dev-dependencies] nalgebra = { version = "0.16", path = "..", features = [ "arbitrary" ] } -quickcheck = "0.6" +quickcheck = "0.7" approx = "0.3" -rand = "0.5" +rand = "0.6" diff --git a/src/geometry/quaternion_construction.rs b/src/geometry/quaternion_construction.rs index e48bfaae..122eb883 100644 --- a/src/geometry/quaternion_construction.rs +++ b/src/geometry/quaternion_construction.rs @@ -693,12 +693,13 @@ where #[cfg(test)] mod tests { + extern crate rand_xorshift; use super::*; - use rand::{self, SeedableRng}; + use rand::SeedableRng; #[test] fn random_unit_quats_are_unit() { - let mut rng = rand::prng::XorShiftRng::from_seed([0xAB; 16]); + let mut rng = rand_xorshift::XorShiftRng::from_seed([0xAB; 16]); for _ in 0..1000 { let x = rng.gen::>(); assert!(relative_eq!(x.into_inner().norm(), 1.0)) diff --git a/src/geometry/rotation_specialization.rs b/src/geometry/rotation_specialization.rs index fa75ca04..960b3a4e 100644 --- a/src/geometry/rotation_specialization.rs +++ b/src/geometry/rotation_specialization.rs @@ -107,9 +107,10 @@ impl Rotation2 { /// /// # Example /// ``` + /// # #[macro_use] extern crate approx; /// # use nalgebra::Rotation2; /// let rot = Rotation2::new(1.78); - /// assert_eq!(rot.angle(), 1.78); + /// assert_relative_eq!(rot.angle(), 1.78); /// ``` #[inline] pub fn angle(&self) -> N { @@ -158,10 +159,11 @@ impl Rotation2 { /// /// # Example /// ``` + /// # #[macro_use] extern crate approx; /// # use nalgebra::Rotation2; /// let rot = Rotation2::new(0.78); /// let pow = rot.powf(2.0); - /// assert_eq!(pow.angle(), 2.0 * 0.78); + /// assert_relative_eq!(pow.angle(), 2.0 * 0.78); /// ``` #[inline] pub fn powf(&self, n: N) -> Rotation2 { @@ -566,7 +568,7 @@ impl Rotation3 { /// # use nalgebra::{Unit, Rotation3, Vector3}; /// let axis = Unit::new_normalize(Vector3::new(1.0, 2.0, 3.0)); /// let rot = Rotation3::from_axis_angle(&axis, 1.78); - /// assert_relative_eq!(rot.angle(), 1.78); + /// assert_eq!(rot.angle(), 1.78); /// ``` #[inline] pub fn angle(&self) -> N { diff --git a/src/geometry/unit_complex.rs b/src/geometry/unit_complex.rs index 14b31d2f..1f83d7f6 100644 --- a/src/geometry/unit_complex.rs +++ b/src/geometry/unit_complex.rs @@ -212,10 +212,11 @@ impl UnitComplex { /// /// # Example /// ``` + /// # #[macro_use] extern crate approx; /// # use nalgebra::UnitComplex; /// let rot = UnitComplex::new(0.78); /// let pow = rot.powf(2.0); - /// assert_eq!(pow.angle(), 2.0 * 0.78); + /// assert_relative_eq!(pow.angle(), 2.0 * 0.78); /// ``` #[inline] pub fn powf(&self, n: N) -> Self {