pub trait NumericByValue<Rhs = Self, Output = Self>: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Neg<Output = Output> + Sized { }
Expand description

A trait defining what a numeric type is in terms of by value numerical operations matrices need their types to support for math operations.

The requirements are Add, Sub, Mul, Div, Neg and Sized. Note that unsigned integers do not implement Neg unless they are wrapped by Wrapping.

Implementors

Anything which implements all the super traits will automatically implement this trait too. This covers primitives such as f32, f64, signed integers and Wrapped unsigned integers as well as Traces and Records of those types.

It will not include Matrix because Matrix does not implement Div. Similarly, unwrapped unsigned integers do not implement Neg so are not included.