Trait VMul

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

Required Associated Types§

Required Methods§

Source

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

Returns the product of a vector-array and a scalar

ua

§Arguments
  • rhs - A scalar
§Examples
let u = [1.0, 2.0];
let a = 2.0
let ua = [u[0]*a, u[1]*a];
assert_eq!(u.mul(a), ua);

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> VMul<R> for [F; N]
where Self: Vector, [<F as Mul<R>>::Output; N]: Vector, F: Mul<R> + Clone, R: Clone,

Source§

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

Source§

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

Implementors§