Trait rin::math::Normed [−][src]
pub trait Normed {
type Norm: SimdRealField;
pub fn norm(&self) -> Self::Norm;
pub fn norm_squared(&self) -> Self::Norm;
pub fn scale_mut(&mut self, n: Self::Norm);
pub fn unscale_mut(&mut self, n: Self::Norm);
}Trait implemented by entities scan be be normalized and put in an Unit struct.
Associated Types
type Norm: SimdRealField[src]
The type of the norm.
Required methods
pub fn norm(&self) -> Self::Norm[src]
Computes the norm.
pub fn norm_squared(&self) -> Self::Norm[src]
Computes the squared norm.
pub fn scale_mut(&mut self, n: Self::Norm)[src]
Multiply self by n.
pub fn unscale_mut(&mut self, n: Self::Norm)[src]
Divides self by n.
Implementors
impl<N> Normed for Complex<N> where
N: SimdRealField, [src]
impl<N> Normed for Complex<N> where
N: SimdRealField, [src]type Norm = <N as SimdComplexField>::SimdRealField
pub fn norm(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn norm_squared(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn scale_mut(&mut self, n: <Complex<N> as Normed>::Norm)[src]
pub fn unscale_mut(&mut self, n: <Complex<N> as Normed>::Norm)[src]
impl<N> Normed for Quaternion<N> where
N: SimdRealField, [src]
impl<N> Normed for Quaternion<N> where
N: SimdRealField, [src]type Norm = <N as SimdComplexField>::SimdRealField
pub fn norm(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn norm_squared(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn scale_mut(&mut self, n: <Quaternion<N> as Normed>::Norm)[src]
pub fn unscale_mut(&mut self, n: <Quaternion<N> as Normed>::Norm)[src]
impl<N, R, C> Normed for Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> where
C: Dim,
N: SimdComplexField,
R: Dim,
DefaultAllocator: Allocator<N, R, C>, [src]
impl<N, R, C> Normed for Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> where
C: Dim,
N: SimdComplexField,
R: Dim,
DefaultAllocator: Allocator<N, R, C>, [src]type Norm = <N as SimdComplexField>::SimdRealField
pub fn norm(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn norm_squared(&self) -> <N as SimdComplexField>::SimdRealField[src]
pub fn scale_mut(
&mut self,
n: <Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> as Normed>::Norm
)[src]
&mut self,
n: <Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> as Normed>::Norm
)
pub fn unscale_mut(
&mut self,
n: <Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> as Normed>::Norm
)[src]
&mut self,
n: <Matrix<N, R, C, <DefaultAllocator as Allocator<N, R, C>>::Buffer> as Normed>::Norm
)