# Struct siege_math::quat::NQuat [−] [src]

`pub struct NQuat<F> { /* fields omitted */ }`

Normalized unit quaternion

## Methods

### `impl<F: FullFloat> NQuat<F>`[src]

#### `pub fn from_axis_angle(axis: &Direction3<F>, angle: &Angle<F>) -> NQuat<F>`[src]

Create an NQuat from an axis and angle

### `impl<F: FullFloat> NQuat<F>`[src]

#### `pub fn as_axis_angle(&self) -> (Direction3<F>, Angle<F>)`[src]

Determine the axis/angle representation of an NQuat

### `impl<F: FullFloat> NQuat<F>`[src]

#### `pub fn rotate(&self, v: Vec3<F>) -> Vec3<F>`[src]

This applies the NQuat as an operator to the vector v, yielding the rotated vector.

## Trait Implementations

### `impl<F: Debug> Debug for NQuat<F>`[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`[src]

Formats the value using the given formatter. Read more

### `impl<F: Clone> Clone for NQuat<F>`[src]

#### `fn clone(&self) -> NQuat<F>`[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0[src]

Performs copy-assignment from `source`. Read more

### `impl<F: PartialEq> PartialEq for NQuat<F>`[src]

#### `fn eq(&self, __arg_0: &NQuat<F>) -> bool`[src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, __arg_0: &NQuat<F>) -> bool`[src]

This method tests for `!=`.

### `impl<F: Hash> Hash for NQuat<F>`[src]

#### `fn hash<__HF: Hasher>(&self, __arg_0: &mut __HF)`[src]

Feeds this value into the given [`Hasher`]. Read more

#### `fn hash_slice<H>(data: &[Self], state: &mut H) where    H: Hasher, `1.3.0[src]

Feeds a slice of this type into the given [`Hasher`]. Read more

### `impl<F: FullFloat> Default for NQuat<F>`[src]

#### `fn default() -> NQuat<F>`[src]

Returns the "default value" for a type. Read more

### `impl From<NQuat<f32>> for NQuat<f64>`[src]

#### `fn from(q: NQuat<f32>) -> NQuat<f64>`[src]

Performs the conversion.

### `impl From<NQuat<f64>> for NQuat<f32>`[src]

#### `fn from(q: NQuat<f64>) -> NQuat<f32>`[src]

Performs the conversion.

### `impl<F: FullFloat> From<Quat<F>> for NQuat<F>`[src]

#### `fn from(q: Quat<F>) -> NQuat<F>`[src]

Performs the conversion.

### `impl<F: FullFloat> From<NQuat<F>> for Quat<F>`[src]

#### `fn from(nq: NQuat<F>) -> Quat<F>`[src]

Performs the conversion.

### `impl<F: FullFloat> Mul for NQuat<F>`[src]

#### `type Output = NQuat<F>`

The resulting type after applying the `*` operator.

#### `fn mul(self, rhs: NQuat<F>) -> NQuat<F>`[src]

Performs the `*` operation.

### `impl<F: FullFloat> Mul<Vec3<F>> for NQuat<F>`[src]

#### `type Output = Vec3<F>`

The resulting type after applying the `*` operator.

#### `fn mul(self, rhs: Vec3<F>) -> Vec3<F>`[src]

Performs the `*` operation.

### `impl<F: FullFloat> From<NQuat<F>> for Mat3<F>`[src]

#### `fn from(q: NQuat<F>) -> Mat3<F>`[src]

Performs the conversion.

### `impl<F: FullFloat> From<Mat3<F>> for NQuat<F>`[src]

#### `fn from(m: Mat3<F>) -> NQuat<F>`[src]

Performs the conversion.

### `impl<F: FullFloat> ApproxEq for NQuat<F>`[src]

#### `fn approx_eq(    &self,     other: &Self,     epsilon: <F as ApproxEq>::Flt,     ulps: <<F as ApproxEq>::Flt as Ulps>::U) -> bool`[src]

This method tests for `self` and `other` values to be approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more

#### `fn approx_ne(    &self,     other: &Self,     epsilon: Self::Flt,     ulps: <Self::Flt as Ulps>::U) -> bool`[src]

This method tests for `self` and `other` values to be not approximately equal using two methods: epsilon and ulps. If the values differ by less than the given epsilon, they will be considered equal. If the values differ by more than epsilon, but by less than the given ulps, they will also be considered equal. Otherwise they are unequal. Read more