pub trait Normed {
type Norm: SimdRealField;
// Required methods
fn norm(&self) -> Self::Norm;
fn norm_squared(&self) -> Self::Norm;
fn scale_mut(&mut self, n: Self::Norm);
fn unscale_mut(&mut self, n: Self::Norm);
}
Expand description
Trait implemented by entities scan be be normalized and put in an Unit
struct.
Required Associated Types§
Sourcetype Norm: SimdRealField
type Norm: SimdRealField
The type of the norm.
Required Methods§
Sourcefn norm_squared(&self) -> Self::Norm
fn norm_squared(&self) -> Self::Norm
Computes the squared norm.
Sourcefn unscale_mut(&mut self, n: Self::Norm)
fn unscale_mut(&mut self, n: Self::Norm)
Divides self
by n.