Struct Rad

Source
pub struct Rad<T>(pub T);

Tuple Fields§

§0: T

Implementations§

Source§

impl Rad<f64>

Source

pub fn to_deg(&self) -> Deg<f64>

Source

pub fn sin(&self) -> f64

Source

pub fn cos(&self) -> f64

Source

pub fn normalized(&self) -> Rad<f64>

Source§

impl Rad<f32>

Source

pub fn to_deg(&self) -> Deg<f32>

Source

pub fn sin(&self) -> f32

Source

pub fn cos(&self) -> f32

Source

pub fn normalized(&self) -> Rad<f32>

Trait Implementations§

Source§

impl AbsDiffEq for Rad<f32>

Source§

type Epsilon = <f32 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> <Rad<f32> as AbsDiffEq>::Epsilon

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

fn abs_diff_eq( &self, other: &Rad<f32>, epsilon: <Rad<f32> as AbsDiffEq>::Epsilon, ) -> bool

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

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

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl AbsDiffEq for Rad<f64>

Source§

type Epsilon = <f64 as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> <Rad<f64> as AbsDiffEq>::Epsilon

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

fn abs_diff_eq( &self, other: &Rad<f64>, epsilon: <Rad<f64> as AbsDiffEq>::Epsilon, ) -> bool

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

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

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<'a, 'b> Add<&'b Rad<f32>> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Rad<f32>) -> Rad<f32>

Performs the + operation. Read more
Source§

impl<'b> Add<&'b Rad<f32>> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Rad<f32>) -> Rad<f32>

Performs the + operation. Read more
Source§

impl<'a, 'b> Add<&'b Rad<f64>> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Rad<f64>) -> Rad<f64>

Performs the + operation. Read more
Source§

impl<'b> Add<&'b Rad<f64>> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'b Rad<f64>) -> Rad<f64>

Performs the + operation. Read more
Source§

impl<'a> Add<Rad<f32>> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: Rad<f32>) -> Rad<f32>

Performs the + operation. Read more
Source§

impl<'a> Add<Rad<f64>> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: Rad<f64>) -> Rad<f64>

Performs the + operation. Read more
Source§

impl Add for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: Rad<f32>) -> Rad<f32>

Performs the + operation. Read more
Source§

impl Add for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: Rad<f64>) -> Rad<f64>

Performs the + operation. Read more
Source§

impl AddAssign for Rad<f32>

Source§

fn add_assign(&mut self, other: Rad<f32>)

Performs the += operation. Read more
Source§

impl AddAssign for Rad<f64>

Source§

fn add_assign(&mut self, other: Rad<f64>)

Performs the += operation. Read more
Source§

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

Source§

fn clone(&self) -> Rad<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for Rad<T>
where T: Debug,

Source§

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

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

impl<'a, 'b> Div<&'b f32> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f32) -> Rad<f32>

Performs the / operation. Read more
Source§

impl<'b> Div<&'b f32> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f32) -> Rad<f32>

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'b f64> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f64) -> Rad<f64>

Performs the / operation. Read more
Source§

impl<'b> Div<&'b f64> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the / operator.
Source§

fn div(self, other: &'b f64) -> Rad<f64>

Performs the / operation. Read more
Source§

impl<'a> Div<f32> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Rad<f32>

Performs the / operation. Read more
Source§

impl Div<f32> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Rad<f32>

Performs the / operation. Read more
Source§

impl<'a> Div<f64> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Rad<f64>

Performs the / operation. Read more
Source§

impl Div<f64> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Rad<f64>

Performs the / operation. Read more
Source§

impl DivAssign<f32> for Rad<f32>

Source§

fn div_assign(&mut self, other: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for Rad<f64>

Source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
Source§

impl<'a, 'b> Mul<&'b f32> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f32) -> Rad<f32>

Performs the * operation. Read more
Source§

impl<'b> Mul<&'b f32> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f32) -> Rad<f32>

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'b f64> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f64) -> Rad<f64>

Performs the * operation. Read more
Source§

impl<'b> Mul<&'b f64> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: &'b f64) -> Rad<f64>

Performs the * operation. Read more
Source§

impl<'a> Mul<f32> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Rad<f32>

Performs the * operation. Read more
Source§

impl Mul<f32> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Rad<f32>

Performs the * operation. Read more
Source§

impl<'a> Mul<f64> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Rad<f64>

Performs the * operation. Read more
Source§

impl Mul<f64> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Rad<f64>

Performs the * operation. Read more
Source§

impl MulAssign<f32> for Rad<f32>

Source§

fn mul_assign(&mut self, other: f32)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Rad<f64>

Source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
Source§

impl<'a> Neg for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Rad<f32>

Performs the unary - operation. Read more
Source§

impl<'a> Neg for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Rad<f64>

Performs the unary - operation. Read more
Source§

impl Neg for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Rad<f32>

Performs the unary - operation. Read more
Source§

impl Neg for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Rad<f64>

Performs the unary - operation. Read more
Source§

impl<T> PartialEq for Rad<T>
where T: PartialEq,

Source§

fn eq(&self, other: &Rad<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> PartialOrd for Rad<T>
where T: PartialOrd,

Source§

fn partial_cmp(&self, other: &Rad<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl RelativeEq for Rad<f32>

Source§

fn default_max_relative() -> <Rad<f32> as AbsDiffEq>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

fn relative_eq( &self, other: &Rad<f32>, epsilon: <Rad<f32> as AbsDiffEq>::Epsilon, max_relative: <Rad<f32> as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
Source§

impl RelativeEq for Rad<f64>

Source§

fn default_max_relative() -> <Rad<f64> as AbsDiffEq>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

fn relative_eq( &self, other: &Rad<f64>, epsilon: <Rad<f64> as AbsDiffEq>::Epsilon, max_relative: <Rad<f64> as AbsDiffEq>::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
Source§

impl<'a, 'b> Sub<&'b Rad<f32>> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Rad<f32>) -> Rad<f32>

Performs the - operation. Read more
Source§

impl<'b> Sub<&'b Rad<f32>> for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Rad<f32>) -> Rad<f32>

Performs the - operation. Read more
Source§

impl<'a, 'b> Sub<&'b Rad<f64>> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Rad<f64>) -> Rad<f64>

Performs the - operation. Read more
Source§

impl<'b> Sub<&'b Rad<f64>> for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'b Rad<f64>) -> Rad<f64>

Performs the - operation. Read more
Source§

impl<'a> Sub<Rad<f32>> for &'a Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Rad<f32>) -> Rad<f32>

Performs the - operation. Read more
Source§

impl<'a> Sub<Rad<f64>> for &'a Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Rad<f64>) -> Rad<f64>

Performs the - operation. Read more
Source§

impl Sub for Rad<f32>

Source§

type Output = Rad<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Rad<f32>) -> Rad<f32>

Performs the - operation. Read more
Source§

impl Sub for Rad<f64>

Source§

type Output = Rad<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Rad<f64>) -> Rad<f64>

Performs the - operation. Read more
Source§

impl SubAssign for Rad<f32>

Source§

fn sub_assign(&mut self, other: Rad<f32>)

Performs the -= operation. Read more
Source§

impl SubAssign for Rad<f64>

Source§

fn sub_assign(&mut self, other: Rad<f64>)

Performs the -= operation. Read more
Source§

impl UlpsEq for Rad<f32>

Source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
Source§

fn ulps_eq( &self, other: &Rad<f32>, epsilon: <Rad<f32> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
Source§

impl UlpsEq for Rad<f64>

Source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
Source§

fn ulps_eq( &self, other: &Rad<f64>, epsilon: <Rad<f64> as AbsDiffEq>::Epsilon, max_ulps: u32, ) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
Source§

impl<T> Copy for Rad<T>
where T: Copy,

Source§

impl<T> Eq for Rad<T>
where T: Eq,

Source§

impl<T> StructuralPartialEq for Rad<T>

Auto Trait Implementations§

§

impl<T> Freeze for Rad<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Rad<T>
where T: RefUnwindSafe,

§

impl<T> Send for Rad<T>
where T: Send,

§

impl<T> Sync for Rad<T>
where T: Sync,

§

impl<T> Unpin for Rad<T>
where T: Unpin,

§

impl<T> UnwindSafe for Rad<T>
where T: UnwindSafe,

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<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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

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.
Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

Source§

impl<T, Right> ClosedDivAssign<Right> for T
where T: ClosedDiv<Right> + DivAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,