diff --git a/src/vector.rs b/src/vector.rs index d27cb81..9acc7b3 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -502,9 +502,11 @@ macro_rules! impl_vector_default { } } - impl Rand for $VectorN { + impl Distribution<$VectorN> for Standard + where S: BaseFloat, + Standard: Distribution { #[inline] - fn rand(rng: &mut R) -> $VectorN { + fn sample(&self, rng: &mut R) -> $VectorN { $VectorN { $($field: rng.gen()),+ } } }