Upgrade approx and rand crates (#523)

This commit is contained in:
Jonathan Behrens 2020-12-25 01:17:01 -05:00 committed by GitHub
parent 8e0d5ece92
commit 4b99f07bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -21,11 +21,11 @@ unstable = []
swizzle = []
[dependencies]
approx = "0.3"
approx = "0.4"
mint = { version = "0.5", optional = true }
num-traits = "0.2"
# small_rng used only for benchmarks
rand = { version = "0.7", features = ["small_rng"], optional = true }
rand = { version = "0.8", features = ["small_rng"], optional = true }
serde = { version = "1.0", features = ["serde_derive"], optional = true }
simd = { version = "0.2", optional = true } # works only in rust toolchain up to 1.32

View file

@ -217,7 +217,7 @@ macro_rules! impl_angle {
S: BaseFloat + SampleUniform {
#[inline]
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> $Angle<S> {
$Angle(rng.gen_range(cast::<_, S>(-$hi).unwrap(), cast::<_, S>($hi).unwrap()))
$Angle(rng.gen_range(cast::<_, S>(-$hi).unwrap() .. cast::<_, S>($hi).unwrap()))
}
}