Trait VDiv

Source
pub trait VDiv<Rhs>: Vector
where Self::Output: Vector,
{ type Output; // Required method fn div(&self, rhs: Rhs) -> Self::Output; }

Required Associated Types§

Required Methods§

Source

fn div(&self, rhs: Rhs) -> Self::Output

Returns the vector-array divided by a scalar

u/b

§Arguments
  • rhs - A scalar
§Examples
let u = [1.0, 2.0];
let b = 2.0
let u_b = [u[0]/b, u[1]/b];
assert_eq!(u.div(b), u_b);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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,

Source§

type Output = [<F as Div<R>>::Output; N]

Source§

fn div(&self, rhs: R) -> Self::Output

Implementors§