Struct vecmat::transform::Rotation2[][src]

pub struct Rotation2<T> { /* fields omitted */ }

Two-dimensional rotation.

Implementations

impl<T> Rotation2<T>[src]

pub fn from_complex(comp: Complex<T>) -> Self[src]

pub fn into_complex(self) -> Complex<T>[src]

impl<T> Rotation2<T> where
    T: Float
[src]

pub fn new(angle: T) -> Self[src]

pub fn angle(&self) -> T[src]

impl<T> Rotation2<T> where
    T: Neg<Output = T> + Copy
[src]

pub fn to_linear(self) -> Linear<T, 2>[src]

Trait Implementations

impl<T> AbsDiffEq<Rotation2<T>> for Rotation2<T> where
    T: AbsDiffEq<Epsilon = T> + Copy
[src]

type Epsilon = T

Used for specifying relative comparisons.

fn default_epsilon() -> Self::Epsilon[src]

The default tolerance to use when testing values that are close together. Read more

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool[src]

A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool[src]

The inverse of AbsDiffEq::abs_diff_eq.

impl<T: Clone> Clone for Rotation2<T>[src]

fn clone(&self) -> Rotation2<T>[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<T: Debug> Debug for Rotation2<T>[src]

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

Formats the value using the given formatter. Read more

impl<T> Directional<Vector<T, 2_usize>> for Rotation2<T> where
    Self: Transform<Vector<T, 2>>, 
[src]

fn apply_dir(&self, pos: Vector<T, 2>, dir: Vector<T, 2>) -> Vector<T, 2>[src]

Returns the result of the direction transformation at the specified position.

fn apply_normal(&self, pos: Vector<T, 2>, normal: Vector<T, 2>) -> Vector<T, 2>[src]

Returns the result of the normal transformation at the specified position. Read more

impl<T> Distribution<Rotation2<T>> for Uniform where
    RangedUniform<T>: Distribution<T>,
    T: SampleUniform + Float + FloatConst + NumCast
[src]

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Rotation2<T>[src]

Generate a random value of T, using rng as the source of randomness.

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
    R: Rng
[src]

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

impl<T> From<Complex<T>> for Rotation2<T>[src]

fn from(comp: Complex<T>) -> Self[src]

Performs the conversion.

impl<T> From<Rotation2<T>> for Complex<T>[src]

fn from(rot: Rotation2<T>) -> Self[src]

Performs the conversion.

impl<T: PartialEq> PartialEq<Rotation2<T>> for Rotation2<T>[src]

fn eq(&self, other: &Rotation2<T>) -> bool[src]

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

fn ne(&self, other: &Rotation2<T>) -> bool[src]

This method tests for !=.

impl<T> Reorder<Rotation2<T>, Vector<T, 2_usize>> for Shift<T, 2> where
    Rotation2<T>: Transform<Vector<T, 2>> + Copy,
    Self: Transform<Vector<T, 2>>, 
[src]

fn reorder(self, other: Rotation2<T>) -> (Rotation2<T>, Shift<T, 2>)[src]

For given A and B returns B' and A'.

impl<T> Reorder<Shift<T, 2_usize>, Vector<T, 2_usize>> for Rotation2<T> where
    Self: Transform<Vector<T, 2>>,
    Shift<T, 2>: Transform<Vector<T, 2>>, 
[src]

fn reorder(self, other: Shift<T, 2>) -> (Shift<T, 2>, Rotation2<T>)[src]

For given A and B returns B' and A'.

impl<T> Transform<Vector<T, 2_usize>> for Rotation2<T> where
    T: Neg<Output = T> + Num + Copy
[src]

fn identity() -> Self[src]

Identity transformation.

fn inv(self) -> Self[src]

Inverse transformation.

fn apply(&self, pos: Vector<T, 2>) -> Vector<T, 2>[src]

Perform the transformation itself.

fn deriv(&self, _pos: Vector<T, 2>, dir: Vector<T, 2>) -> Vector<T, 2>[src]

Find transformation directional derivative at specified point.

fn chain(self, other: Self) -> Self[src]

Chain two transformations into a new one. Read more

impl<T: Copy> Copy for Rotation2<T>[src]

impl<T> StructuralPartialEq for Rotation2<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Rotation2<T> where
    T: RefUnwindSafe

impl<T> Send for Rotation2<T> where
    T: Send

impl<T> Sync for Rotation2<T> where
    T: Sync

impl<T> Unpin for Rotation2<T> where
    T: Unpin

impl<T> UnwindSafe for Rotation2<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V