Trait ArrayMathExt

Source
pub trait ArrayMathExt<F: Float> {
    // Required methods
    fn array_add(self, other: Self) -> Self;
    fn array_sub(self, other: Self) -> Self;
    fn array_scale(self, value: F) -> Self;
}
Expand description

Simple math for array

Required Methods§

Source

fn array_add(self, other: Self) -> Self

Source

fn array_sub(self, other: Self) -> Self

Source

fn array_scale(self, value: F) -> Self

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, const N: usize> ArrayMathExt<F> for [F; N]
where F: Float + Debug,

Source§

fn array_add(self, other: Self) -> Self

Adds two arrays. Returns x + y.

Source§

fn array_sub(self, other: Self) -> Self

Subtracts two arrays. Returns x - y.

Source§

fn array_scale(self, value: F) -> Self

Scale one array with a value.

Implementors§