Fixed a compiler issue with the 'simd' feature

This commit is contained in:
Victor Koenders 2018-06-08 14:35:12 +02:00
parent df4f27e40e
commit bd88d9e93f

View file

@ -502,9 +502,11 @@ macro_rules! impl_vector_default {
}
}
impl<S: BaseFloat + Rand> Rand for $VectorN<S> {
impl<S> Distribution<$VectorN<S>> for Standard
where S: BaseFloat,
Standard: Distribution<S> {
#[inline]
fn rand<R: Rng>(rng: &mut R) -> $VectorN<S> {
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> $VectorN<S> {
$VectorN { $($field: rng.gen()),+ }
}
}