Trait vecfx::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

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§