Trait array_math::ArrayMath
source · pub trait ArrayMath<T, const N: usize>: ArrayOps<T, N> {
// Required methods
fn magnitude_squared(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + ZeroConst> + Copy;
fn normalize(
self
) -> Self::MappedTo<<T as Mul<<T as Mul<T>>::Output>>::Output>
where T: Mul<T, Output: AddAssign + ZeroConst + ApproxInvSqrt + Copy> + Mul<<T as Mul<T>>::Output> + Copy;
fn normalize_to<Rhs>(
self,
magnitude: Rhs
) -> Self::MappedTo<<T as Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output>>::Output>
where T: Mul<T, Output: AddAssign + ZeroConst + ApproxInvSqrt + Mul<Rhs, Output: Copy>> + Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output> + Copy;
// Provided methods
fn sum(self) -> T
where T: AddAssign + ZeroConst { ... }
fn product(self) -> T
where T: MulAssign + OneConst { ... }
fn avg(self) -> <T as Div>::Output
where u8: Into<T>,
T: Div + AddAssign + ZeroConst { ... }
fn avg16(self) -> <T as Div>::Output
where u16: Into<T>,
T: Div + AddAssign + ZeroConst { ... }
fn avg32(self) -> <T as Div>::Output
where u32: Into<T>,
T: Div + AddAssign + ZeroConst { ... }
fn avg64(self) -> <T as Div>::Output
where u64: Into<T>,
T: Div + AddAssign + ZeroConst { ... }
fn mul_dot<Rhs>(self, rhs: Self::MappedTo<Rhs>) -> <T as Mul<Rhs>>::Output
where T: Mul<Rhs, Output: AddAssign + ZeroConst> { ... }
fn magnitude(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + ZeroConst + ApproxSqrt> + Copy { ... }
fn magnitude_inv(self) -> <T as Mul<T>>::Output
where T: Mul<T, Output: AddAssign + ZeroConst + ApproxInvSqrt> + Copy { ... }
}Required Methods§
fn magnitude_squared(self) -> <T as Mul<T>>::Output
fn normalize(self) -> Self::MappedTo<<T as Mul<<T as Mul<T>>::Output>>::Output>
fn normalize_to<Rhs>( self, magnitude: Rhs ) -> Self::MappedTo<<T as Mul<<<T as Mul<T>>::Output as Mul<Rhs>>::Output>>::Output>
Provided Methods§
fn sum(self) -> T
fn product(self) -> T
fn avg(self) -> <T as Div>::Output
fn avg16(self) -> <T as Div>::Output
fn avg32(self) -> <T as Div>::Output
fn avg64(self) -> <T as Div>::Output
fn mul_dot<Rhs>(self, rhs: Self::MappedTo<Rhs>) -> <T as Mul<Rhs>>::Output
fn magnitude(self) -> <T as Mul<T>>::Output
fn magnitude_inv(self) -> <T as Mul<T>>::Output
Object Safety§
This trait is not object safe.