optimath/
random.rs

1use crate::{types::Stupidity, Vector};
2use rand::{
3	distributions::{Distribution, Standard},
4	Rng,
5};
6
7impl<T, const N: usize> Distribution<Vector<T, N>> for Standard
8where
9	Standard: Distribution<T>,
10{
11	fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Vector<T, N> {
12		Vector::build_with_fn(|_| rng.gen())
13	}
14}