Struct truck_polymesh::base::Deg

source ·
#[repr(C)]
pub struct Deg<S>(pub S);
Expand description

An angle, in degrees.

This type is marked as #[repr(C)].

Tuple Fields§

§0: S

Trait Implementations§

source§

impl<S> AbsDiffEq for Deg<S>
where S: BaseFloat,

source§

type Epsilon = <S as AbsDiffEq>::Epsilon

Used for specifying relative comparisons.
source§

fn default_epsilon() -> <S as AbsDiffEq>::Epsilon

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

fn abs_diff_eq( &self, other: &Deg<S>, epsilon: <S 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, S> Add<&'a Deg<S>> for &'b Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Deg<S>) -> Deg<S>

Performs the + operation. Read more
source§

impl<'a, S> Add<&'a Deg<S>> for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the + operator.
source§

fn add(self, other: &'a Deg<S>) -> Deg<S>

Performs the + operation. Read more
source§

impl<'a, S> Add<Deg<S>> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Deg<S>) -> Deg<S>

Performs the + operation. Read more
source§

impl<S> Add for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the + operator.
source§

fn add(self, other: Deg<S>) -> Deg<S>

Performs the + operation. Read more
source§

impl<S> AddAssign for Deg<S>
where S: BaseFloat + AddAssign,

source§

fn add_assign(&mut self, other: Deg<S>)

Performs the += operation. Read more
source§

impl<S> Angle for Deg<S>
where S: BaseFloat,

source§

type Unitless = S

source§

fn full_turn() -> Deg<S>

A full rotation.
source§

fn sin(self) -> S

Compute the sine of the angle, returning a unitless ratio. Read more
source§

fn cos(self) -> S

Compute the cosine of the angle, returning a unitless ratio. Read more
source§

fn tan(self) -> S

Compute the tangent of the angle, returning a unitless ratio. Read more
source§

fn sin_cos(self) -> (S, S)

Compute the sine and cosine of the angle, returning the result as a pair. Read more
source§

fn asin(a: S) -> Deg<S>

Compute the arcsine of the ratio, returning the resulting angle. Read more
source§

fn acos(a: S) -> Deg<S>

Compute the arccosine of the ratio, returning the resulting angle. Read more
source§

fn atan(a: S) -> Deg<S>

Compute the arctangent of the ratio, returning the resulting angle. Read more
source§

fn atan2(a: S, b: S) -> Deg<S>

source§

fn normalize(self) -> Self

Return the angle, normalized to the range [0, full_turn).
source§

fn normalize_signed(self) -> Self

Return the angle, normalized to the range [-turn_div_2, turn_div_2).
source§

fn opposite(self) -> Self

Return the angle rotated by half a turn.
source§

fn bisect(self, other: Self) -> Self

Returns the interior bisector of the two angles.
source§

fn turn_div_2() -> Self

Half of a full rotation.
source§

fn turn_div_3() -> Self

A third of a full rotation.
source§

fn turn_div_4() -> Self

A quarter of a full rotation.
source§

fn turn_div_6() -> Self

A sixth of a full rotation.
source§

fn csc(self) -> Self::Unitless

Compute the cosecant of the angle. Read more
source§

fn cot(self) -> Self::Unitless

Compute the cotangent of the angle. Read more
source§

fn sec(self) -> Self::Unitless

Compute the secant of the angle. Read more
source§

impl<S> Bounded for Deg<S>
where S: Bounded,

source§

fn min_value() -> Deg<S>

Returns the smallest finite number this type can represent
source§

fn max_value() -> Deg<S>

Returns the largest finite number this type can represent
source§

impl<S> Clone for Deg<S>
where S: Clone,

source§

fn clone(&self) -> Deg<S>

Returns a copy 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<S> Debug for Deg<S>
where S: Debug,

source§

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

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

impl<'de, S> Deserialize<'de> for Deg<S>
where S: Deserialize<'de>,

source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Deg<S>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'a, 'b, S> Div<&'a Deg<S>> for &'b Deg<S>
where S: BaseFloat,

source§

type Output = S

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Deg<S>) -> S

Performs the / operation. Read more
source§

impl<'a, S> Div<&'a Deg<S>> for Deg<S>
where S: BaseFloat,

source§

type Output = S

The resulting type after applying the / operator.
source§

fn div(self, other: &'a Deg<S>) -> S

Performs the / operation. Read more
source§

impl<'a, S> Div<Deg<S>> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = S

The resulting type after applying the / operator.
source§

fn div(self, other: Deg<S>) -> S

Performs the / operation. Read more
source§

impl<'a, S> Div<S> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Deg<S>

Performs the / operation. Read more
source§

impl<S> Div<S> for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the / operator.
source§

fn div(self, other: S) -> Deg<S>

Performs the / operation. Read more
source§

impl<S> Div for Deg<S>
where S: BaseFloat,

source§

type Output = S

The resulting type after applying the / operator.
source§

fn div(self, other: Deg<S>) -> S

Performs the / operation. Read more
source§

impl<S> DivAssign<S> for Deg<S>
where S: BaseFloat + DivAssign,

source§

fn div_assign(&mut self, scalar: S)

Performs the /= operation. Read more
source§

impl<S> From<Deg<S>> for Rad<S>
where S: BaseFloat,

source§

fn from(deg: Deg<S>) -> Rad<S>

Converts to this type from the input type.
source§

impl<S> From<Rad<S>> for Deg<S>
where S: BaseFloat,

source§

fn from(rad: Rad<S>) -> Deg<S>

Converts to this type from the input type.
source§

impl<'a, S> Mul<S> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Deg<S>

Performs the * operation. Read more
source§

impl<S> Mul<S> for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the * operator.
source§

fn mul(self, other: S) -> Deg<S>

Performs the * operation. Read more
source§

impl<S> MulAssign<S> for Deg<S>
where S: BaseFloat + MulAssign,

source§

fn mul_assign(&mut self, scalar: S)

Performs the *= operation. Read more
source§

impl<'a, S> Neg for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Deg<S>

Performs the unary - operation. Read more
source§

impl<S> Neg for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn neg(self) -> Deg<S>

Performs the unary - operation. Read more
source§

impl<S> PartialEq for Deg<S>
where S: PartialEq,

source§

fn eq(&self, other: &Deg<S>) -> 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<S> PartialOrd for Deg<S>
where S: PartialOrd,

source§

fn partial_cmp(&self, other: &Deg<S>) -> 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<S> RelativeEq for Deg<S>
where S: BaseFloat,

source§

fn default_max_relative() -> <S as AbsDiffEq>::Epsilon

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

fn relative_eq( &self, other: &Deg<S>, epsilon: <S as AbsDiffEq>::Epsilon, max_relative: <S 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, S> Rem<&'a Deg<S>> for &'b Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Deg<S>) -> Deg<S>

Performs the % operation. Read more
source§

impl<'a, S> Rem<&'a Deg<S>> for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: &'a Deg<S>) -> Deg<S>

Performs the % operation. Read more
source§

impl<'a, S> Rem<Deg<S>> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: Deg<S>) -> Deg<S>

Performs the % operation. Read more
source§

impl<S> Rem for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the % operator.
source§

fn rem(self, other: Deg<S>) -> Deg<S>

Performs the % operation. Read more
source§

impl<S> RemAssign for Deg<S>
where S: BaseFloat + RemAssign,

source§

fn rem_assign(&mut self, other: Deg<S>)

Performs the %= operation. Read more
source§

impl<S> Serialize for Deg<S>
where S: Serialize,

source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a, 'b, S> Sub<&'a Deg<S>> for &'b Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Deg<S>) -> Deg<S>

Performs the - operation. Read more
source§

impl<'a, S> Sub<&'a Deg<S>> for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: &'a Deg<S>) -> Deg<S>

Performs the - operation. Read more
source§

impl<'a, S> Sub<Deg<S>> for &'a Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Deg<S>) -> Deg<S>

Performs the - operation. Read more
source§

impl<S> Sub for Deg<S>
where S: BaseFloat,

source§

type Output = Deg<S>

The resulting type after applying the - operator.
source§

fn sub(self, other: Deg<S>) -> Deg<S>

Performs the - operation. Read more
source§

impl<S> SubAssign for Deg<S>
where S: BaseFloat + SubAssign,

source§

fn sub_assign(&mut self, other: Deg<S>)

Performs the -= operation. Read more
source§

impl<'a, S> Sum<&'a Deg<S>> for Deg<S>
where S: 'a + BaseFloat,

source§

fn sum<I>(iter: I) -> Deg<S>
where I: Iterator<Item = &'a Deg<S>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S> Sum for Deg<S>
where S: BaseFloat,

source§

fn sum<I>(iter: I) -> Deg<S>
where I: Iterator<Item = Deg<S>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<S> UlpsEq for Deg<S>
where S: BaseFloat,

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: &Deg<S>, epsilon: <S 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<S> Zero for Deg<S>
where S: BaseFloat,

source§

fn zero() -> Deg<S>

Returns the additive identity element of Self, 0. Read more
source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
source§

impl<S> Copy for Deg<S>
where S: Copy,

source§

impl<S> StructuralPartialEq for Deg<S>

Auto Trait Implementations§

§

impl<S> Freeze for Deg<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Deg<S>
where S: RefUnwindSafe,

§

impl<S> Send for Deg<S>
where S: Send,

§

impl<S> Sync for Deg<S>
where S: Sync,

§

impl<S> Unpin for Deg<S>
where S: Unpin,

§

impl<S> UnwindSafe for Deg<S>
where S: 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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> LowerBounded for T
where T: Bounded,

source§

fn min_value() -> T

Returns the smallest finite number this type can represent
source§

impl<T> Origin for T
where T: Tolerance + Zero,

source§

fn so_small(&self) -> bool

near origin
source§

fn so_small2(&self) -> bool

near origin in square order
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> Tolerance for T
where T: AbsDiffEq<Epsilon = f64> + Debug,

source§

fn near(&self, other: &Self) -> bool

The “distance” is less than TOLERANCE.
source§

fn near2(&self, other: &Self) -> bool

The “distance” is less than TOLERANCR2.
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> UpperBounded for T
where T: Bounded,

source§

fn max_value() -> T

Returns the largest finite number this type can represent
source§

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

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,