use std::ops::Div;
use crate::Vector;
pub trait VDiv<Rhs>: Vector
where Self::Output: Vector
{
type Output;
fn div(&self, rhs: Rhs) -> Self::Output;
}
impl<F, R, const N: usize> VDiv<R> for [F; N]
where
Self: Vector,
[<F as Div<R>>::Output; N]: Vector,
F: Div<R> + Clone,
R: Clone
{
type Output = [<F as Div<R>>::Output; N];
fn div(&self, rhs: R) -> Self::Output
{
array_init::array_init(|i| self[i].clone()/rhs.clone())
}
}