diff --git a/Cargo.toml b/Cargo.toml index 9842c79..3efa22d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cgmath" -version = "0.16.1" +version = "0.17.0" authors = ["Brendan Zabarauskas "] license = "Apache-2.0" description = "A linear algebra and mathematics library for computer graphics." @@ -21,13 +21,13 @@ unstable = [] swizzle = [] [dependencies] -approx = "0.2" +approx = "0.3" mint = { version = "0.5", optional = true } num-traits = "0.2" -rand = "0.5" +rand = "0.6" serde = { version = "1.0", features = ["serde_derive"], optional = true } simd = { version = "0.2", optional = true } [dev-dependencies] -glium = "0.19" +glium = "0.23" serde_json = "1.0" diff --git a/src/angle.rs b/src/angle.rs index 5fd0db8..f932914 100644 --- a/src/angle.rs +++ b/src/angle.rs @@ -208,13 +208,13 @@ macro_rules! impl_angle { S::ulps_eq(&self.0, &other.0, epsilon, max_ulps) } } - - impl Distribution<$Angle> for Standard + + impl Distribution<$Angle> for Standard where Standard: Distribution, S: BaseFloat + SampleUniform { #[inline] fn sample(&self, rng: &mut R) -> $Angle { - $Angle(rng.gen_range(cast(-$hi).unwrap(), cast($hi).unwrap())) + $Angle(rng.gen_range(cast::<_, S>(-$hi).unwrap(), cast::<_, S>($hi).unwrap())) } }