Skip to main content

Nrml

Struct Nrml 

Source
pub struct Nrml<const N: usize, S: Field>(/* private fields */);

Implementations§

Source§

impl<S: Field, const N: usize> Nrml<N, S>

Source

pub const unsafe fn new_unchecked(array: [S; N]) -> Nrml<N, S>

.

§Safety

This is safe if the values are actually normalized.

They should have just been divided by their magnitude.

.

Source

pub const fn axis(i: usize) -> Self

Source§

impl<const N: usize> Nrml<N, f32>

Source

pub fn to_f64(self) -> Nrml<N, f64>

Source§

impl<const N: usize> Nrml<N, f64>

Source

pub fn to_f32(self) -> Nrml<N, f32>

Source§

impl<S: Field, const N: usize> Nrml<N, S>

Source

pub fn array(self) -> [S; N]

Source§

impl<S: Field> Nrml<1, S>

Source

pub fn x(self) -> S

Source§

impl<S: Field> Nrml<2, S>

Source

pub fn x(self) -> S

Source

pub fn y(self) -> S

Source§

impl<S: Field> Nrml<3, S>

Source

pub fn x(self) -> S

Source

pub fn y(self) -> S

Source

pub fn z(self) -> S

Source§

impl<S: Field> Nrml<4, S>

Source

pub fn x(self) -> S

Source

pub fn y(self) -> S

Source

pub fn z(self) -> S

Source

pub fn w(self) -> S

Trait Implementations§

Source§

impl<S: Field, const N: usize> Add for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Field, const N: usize> Add<Nrml<N, S>> for Vect<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Nrml<N, S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Field, const N: usize> Add<Vect<N, S>> for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Vect<N, S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Field, const N: usize> AngleTo for Nrml<N, S>

Source§

type Output = S

Source§

fn angle_to(self, other: Self) -> Self::Output

Source§

impl<S: Field, const N: usize> AngleTo<Nrml<N, S>> for Option<Nrml<N, S>>

Source§

type Output = S

Source§

fn angle_to(self, other: Nrml<N, S>) -> Self::Output

Source§

impl<S: Field, const N: usize> AngleTo<Option<Nrml<N, S>>> for Nrml<N, S>

Source§

type Output = S

Source§

fn angle_to(self, other: Option<Self>) -> Self::Output

Source§

impl<const N: usize, S: Field> Apl<Nrml<N, S>> for Rot<N, S>
where (): RotDim<N>,

Source§

type Output = Nrml<N, S>

Source§

fn apl(self, other: Nrml<N, S>) -> Self::Output

Source§

impl<const N: usize, S: Clone + Field> Clone for Nrml<N, S>

Source§

fn clone(&self) -> Nrml<N, S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, S: Copy + Field> Copy for Nrml<N, S>

Source§

impl<S: Field, const N: usize> Cross for Nrml<N, S>
where Vect<N, S>: Cross,

Source§

type Output = <Vect<N, S> as Cross>::Output

Source§

fn cross(self, other: Self) -> Self::Output

Source§

impl<S: Field, const N: usize> Cross<Nrml<N, S>> for Vect<N, S>
where Self: Cross,

Source§

type Output = <Vect<N, S> as Cross>::Output

Source§

fn cross(self, other: Nrml<N, S>) -> Self::Output

Source§

impl<S: Field, const N: usize> Cross<Vect<N, S>> for Nrml<N, S>
where Vect<N, S>: Cross,

Source§

type Output = <Vect<N, S> as Cross>::Output

Source§

fn cross(self, other: Vect<N, S>) -> Self::Output

Source§

impl<S: Field + Debug, const N: usize> Debug for Nrml<N, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Field + Display, const N: usize> Display for Nrml<N, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Field, const N: usize> Div<S> for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: S) -> Self::Output

Performs the / operation. Read more
Source§

impl<S: Field, const N: usize> Dot<Nrml<N, S>> for Nrml<N, S>

Source§

type Output = S

Source§

fn dot(self, other: Self) -> S

Source§

impl<S: Field, const N: usize> Dot<Nrml<N, S>> for Vect<N, S>

Source§

type Output = S

Source§

fn dot(self, other: Nrml<N, S>) -> S

Source§

impl<S: Field, const N: usize> Dot<Vect<N, S>> for Nrml<N, S>

Source§

type Output = S

Source§

fn dot(self, other: Vect<N, S>) -> S

Source§

impl<const N: usize, S: Eq + Field> Eq for Nrml<N, S>

Source§

impl<S: Field, const N: usize> From<Nrml<N, S>> for Vect<N, S>

Source§

fn from(value: Nrml<N, S>) -> Self

Converts to this type from the input type.
Source§

impl<const N: usize, S: Hash + Field> Hash for Nrml<N, S>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<S: Field, const N: usize> Index<usize> for Nrml<N, S>

Source§

type Output = S

The returned type after indexing.
Source§

fn index(&self, i: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<S: Field, const N: usize> Mul<S> for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: S) -> Self::Output

Performs the * operation. Read more
Source§

impl<S: Field, const N: usize> Neg for Nrml<N, S>

Source§

type Output = Nrml<N, S>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const N: usize, S: PartialEq + Field> PartialEq for Nrml<N, S>

Source§

fn eq(&self, other: &Nrml<N, S>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<S: Field, const N: usize> ProjRej<Nrml<N, S>> for Nrml<N, S>

Source§

type Output = Vect<N, S>

Source§

fn proj(self, axis: Nrml<N, S>) -> Vect<N, S>

Source§

fn rej(self, axis: Nrml<N, S>) -> Vect<N, S>

Source§

fn proj_rej(self, axis: Nrml<N, S>) -> (Vect<N, S>, Vect<N, S>)

Source§

impl<S: Field, const N: usize> ProjRej<Nrml<N, S>> for Vect<N, S>

Source§

type Output = Vect<N, S>

Source§

fn proj(self, axis: Nrml<N, S>) -> Self

Source§

fn rej(self, axis: Nrml<N, S>) -> Self

Source§

fn proj_rej(self, axis: Nrml<N, S>) -> (Self, Self)

Source§

impl<S: Field, const N: usize> ProjRej<Option<Nrml<N, S>>> for Nrml<N, S>

Source§

type Output = Vect<N, S>

Source§

fn proj(self, axis: Option<Nrml<N, S>>) -> Self::Output

Source§

fn rej(self, axis: Option<Nrml<N, S>>) -> Self::Output

Source§

fn proj_rej(self, axis: Option<Nrml<N, S>>) -> (Self::Output, Self::Output)

Source§

impl<S: Field, const N: usize> Refl<Nrml<N, S>> for Vect<N, S>

Source§

type Output = Vect<N, S>

Source§

fn refl(self, axis: Nrml<N, S>) -> Self::Output

Source§

impl<const N: usize, S: PartialEq + Field> StructuralPartialEq for Nrml<N, S>

Source§

impl<S: Field, const N: usize> Sub for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<S: Field, const N: usize> Sub<Nrml<N, S>> for Vect<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Nrml<N, S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S: Field, const N: usize> Sub<Vect<N, S>> for Nrml<N, S>

Source§

type Output = Vect<N, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Vect<N, S>) -> Self::Output

Performs the - operation. Read more

Auto Trait Implementations§

§

impl<const N: usize, S> Freeze for Nrml<N, S>
where [S; N]: Freeze,

§

impl<const N: usize, S> RefUnwindSafe for Nrml<N, S>

§

impl<const N: usize, S> Send for Nrml<N, S>
where [S; N]: Send,

§

impl<const N: usize, S> Sync for Nrml<N, S>
where [S; N]: Sync,

§

impl<const N: usize, S> Unpin for Nrml<N, S>
where [S; N]: Unpin,

§

impl<const N: usize, S> UnsafeUnpin for Nrml<N, S>

§

impl<const N: usize, S> UnwindSafe for Nrml<N, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<A, T> Apl<T> for A
where T: Aplable<A>,

Source§

type Output = <T as Aplable<A>>::Output

Source§

fn apl(self, other: T) -> <A as Apl<T>>::Output

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Maybe<T> for T

Source§

fn maybe(self) -> Option<T>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.