Struct nannou::math::Deg [−][src]
#[repr(C)]pub struct Deg<S>(pub S);
An angle, in degrees.
This type is marked as #[repr(C)]
.
Trait Implementations
impl<S> Rand for Deg<S> where
S: BaseFloat + SampleRange,
[src]
impl<S> Rand for Deg<S> where
S: BaseFloat + SampleRange,
fn rand<R>(rng: &mut R) -> Deg<S> where
R: Rng,
[src]
fn rand<R>(rng: &mut R) -> Deg<S> where
R: Rng,
Generates a random instance of this type using the specified source of randomness. Read more
impl<S> PartialOrd<Deg<S>> for Deg<S> where
S: PartialOrd<S>,
[src]
impl<S> PartialOrd<Deg<S>> for Deg<S> where
S: PartialOrd<S>,
fn partial_cmp(&self, other: &Deg<S>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Deg<S>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Deg<S>) -> bool
[src]
fn lt(&self, other: &Deg<S>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Deg<S>) -> bool
[src]
fn le(&self, other: &Deg<S>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Deg<S>) -> bool
[src]
fn gt(&self, other: &Deg<S>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Deg<S>) -> bool
[src]
fn ge(&self, other: &Deg<S>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<S> Sub<Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Sub<Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn sub(self, other: Deg<S>) -> Deg<S>
[src]
fn sub(self, other: Deg<S>) -> Deg<S>
Performs the -
operation.
impl<'a, 'b, S> Sub<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
[src]
impl<'a, 'b, S> Sub<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn sub(self, other: &'a Deg<S>) -> Deg<S>
Performs the -
operation.
impl<'a, S> Sub<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Sub<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn sub(self, other: &'a Deg<S>) -> Deg<S>
Performs the -
operation.
impl<'a, S> Sub<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Sub<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn sub(self, other: Deg<S>) -> Deg<S>
[src]
fn sub(self, other: Deg<S>) -> Deg<S>
Performs the -
operation.
impl<S> Clone for Deg<S> where
S: Clone,
[src]
impl<S> Clone for Deg<S> where
S: Clone,
fn clone(&self) -> Deg<S>
[src]
fn clone(&self) -> Deg<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S> MulAssign<S> for Deg<S> where
S: BaseFloat + MulAssign<S>,
[src]
impl<S> MulAssign<S> for Deg<S> where
S: BaseFloat + MulAssign<S>,
fn mul_assign(&mut self, scalar: S)
[src]
fn mul_assign(&mut self, scalar: S)
Performs the *=
operation.
impl<S> Debug for Deg<S> where
S: Debug,
[src]
impl<S> Debug for Deg<S> where
S: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<S> Sum<Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Sum<Deg<S>> for Deg<S> where
S: BaseFloat,
fn sum<I>(iter: I) -> Deg<S> where
I: Iterator<Item = Deg<S>>,
[src]
fn sum<I>(iter: I) -> Deg<S> where
I: Iterator<Item = Deg<S>>,
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl<'a, S> Sum<&'a Deg<S>> for Deg<S> where
S: 'a + BaseFloat,
[src]
impl<'a, S> Sum<&'a Deg<S>> for Deg<S> where
S: 'a + BaseFloat,
fn sum<I>(iter: I) -> Deg<S> where
I: Iterator<Item = &'a Deg<S>>,
[src]
fn sum<I>(iter: I) -> Deg<S> where
I: Iterator<Item = &'a Deg<S>>,
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl<S> Mul<S> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Mul<S> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Deg<S>
[src]
fn mul(self, other: S) -> Deg<S>
Performs the *
operation.
impl<'a, S> Mul<S> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Mul<S> for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Deg<S>
[src]
fn mul(self, other: S) -> Deg<S>
Performs the *
operation.
impl<S> RemAssign<Deg<S>> for Deg<S> where
S: BaseFloat + RemAssign<S>,
[src]
impl<S> RemAssign<Deg<S>> for Deg<S> where
S: BaseFloat + RemAssign<S>,
fn rem_assign(&mut self, other: Deg<S>)
[src]
fn rem_assign(&mut self, other: Deg<S>)
Performs the %=
operation.
impl<'de, S> Deserialize<'de> for Deg<S> where
S: Deserialize<'de>,
[src]
impl<'de, S> Deserialize<'de> for Deg<S> where
S: Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Deg<S>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
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
impl<S> Angle for Deg<S> where
S: BaseFloat,
[src]
impl<S> Angle for Deg<S> where
S: BaseFloat,
type Unitless = S
fn full_turn() -> Deg<S>
[src]
fn full_turn() -> Deg<S>
A full rotation.
fn sin(self) -> S
[src]
fn sin(self) -> S
Compute the sine of the angle, returning a unitless ratio. Read more
fn cos(self) -> S
[src]
fn cos(self) -> S
Compute the cosine of the angle, returning a unitless ratio. Read more
fn tan(self) -> S
[src]
fn tan(self) -> S
Compute the tangent of the angle, returning a unitless ratio. Read more
fn sin_cos(self) -> (S, S)
[src]
fn sin_cos(self) -> (S, S)
Compute the sine and cosine of the angle, returning the result as a pair. Read more
fn asin(a: S) -> Deg<S>
[src]
fn asin(a: S) -> Deg<S>
Compute the arcsine of the ratio, returning the resulting angle. Read more
fn acos(a: S) -> Deg<S>
[src]
fn acos(a: S) -> Deg<S>
Compute the arccosine of the ratio, returning the resulting angle. Read more
fn atan(a: S) -> Deg<S>
[src]
fn atan(a: S) -> Deg<S>
Compute the arctangent of the ratio, returning the resulting angle. Read more
fn atan2(a: S, b: S) -> Deg<S>
[src]
fn atan2(a: S, b: S) -> Deg<S>
fn normalize(self) -> Self
[src]
fn normalize(self) -> Self
Return the angle, normalized to the range [0, full_turn)
.
fn opposite(self) -> Self
[src]
fn opposite(self) -> Self
Return the angle rotated by half a turn.
fn bisect(self, other: Self) -> Self
[src]
fn bisect(self, other: Self) -> Self
Returns the interior bisector of the two angles.
fn turn_div_2() -> Self
[src]
fn turn_div_2() -> Self
Half of a full rotation.
fn turn_div_3() -> Self
[src]
fn turn_div_3() -> Self
A third of a full rotation.
fn turn_div_4() -> Self
[src]
fn turn_div_4() -> Self
A quarter of a full rotation.
fn turn_div_6() -> Self
[src]
fn turn_div_6() -> Self
A sixth of a full rotation.
fn csc(self) -> Self::Unitless
[src]
fn csc(self) -> Self::Unitless
Compute the cosecant of the angle. Read more
fn cot(self) -> Self::Unitless
[src]
fn cot(self) -> Self::Unitless
Compute the cotangent of the angle. Read more
fn sec(self) -> Self::Unitless
[src]
fn sec(self) -> Self::Unitless
Compute the secant of the angle. Read more
impl<S> Neg for Deg<S> where
S: BaseFloat,
[src]
impl<S> Neg for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn neg(self) -> Deg<S>
[src]
fn neg(self) -> Deg<S>
Performs the unary -
operation.
impl<'a, S> Neg for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Neg for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the -
operator.
fn neg(self) -> Deg<S>
[src]
fn neg(self) -> Deg<S>
Performs the unary -
operation.
impl<S> AddAssign<Deg<S>> for Deg<S> where
S: BaseFloat + AddAssign<S>,
[src]
impl<S> AddAssign<Deg<S>> for Deg<S> where
S: BaseFloat + AddAssign<S>,
fn add_assign(&mut self, other: Deg<S>)
[src]
fn add_assign(&mut self, other: Deg<S>)
Performs the +=
operation.
impl<S> From<Rad<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> From<Rad<S>> for Deg<S> where
S: BaseFloat,
impl<S> From<Deg<S>> for Rad<S> where
S: BaseFloat,
[src]
impl<S> From<Deg<S>> for Rad<S> where
S: BaseFloat,
impl<S> ApproxEq for Deg<S> where
S: BaseFloat,
[src]
impl<S> ApproxEq for Deg<S> where
S: BaseFloat,
type Epsilon = <S as ApproxEq>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <S as ApproxEq>::Epsilon
[src]
fn default_epsilon() -> <S as ApproxEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> <S as ApproxEq>::Epsilon
[src]
fn default_max_relative() -> <S as ApproxEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Deg<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_relative: <S as ApproxEq>::Epsilon
) -> bool
[src]
fn relative_eq(
&self,
other: &Deg<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_relative: <S as ApproxEq>::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(
&self,
other: &Deg<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
[src]
fn ulps_eq(
&self,
other: &Deg<S>,
epsilon: <S as ApproxEq>::Epsilon,
max_ulps: u32
) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
impl<'a, S> Add<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Add<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn add(self, other: &'a Deg<S>) -> Deg<S>
Performs the +
operation.
impl<'a, 'b, S> Add<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
[src]
impl<'a, 'b, S> Add<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn add(self, other: &'a Deg<S>) -> Deg<S>
Performs the +
operation.
impl<S> Add<Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Add<Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the +
operator.
fn add(self, other: Deg<S>) -> Deg<S>
[src]
fn add(self, other: Deg<S>) -> Deg<S>
Performs the +
operation.
impl<'a, S> Add<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Add<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the +
operator.
fn add(self, other: Deg<S>) -> Deg<S>
[src]
fn add(self, other: Deg<S>) -> Deg<S>
Performs the +
operation.
impl<S> Serialize for Deg<S> where
S: Serialize,
[src]
impl<S> Serialize for Deg<S> where
S: Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
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
impl<S> Zero for Deg<S> where
S: BaseFloat,
[src]
impl<S> Zero for Deg<S> where
S: BaseFloat,
fn zero() -> Deg<S>
[src]
fn zero() -> Deg<S>
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl<S> Bounded for Deg<S> where
S: Bounded,
[src]
impl<S> Bounded for Deg<S> where
S: Bounded,
fn min_value() -> Deg<S>
[src]
fn min_value() -> Deg<S>
returns the smallest finite number this type can represent
fn max_value() -> Deg<S>
[src]
fn max_value() -> Deg<S>
returns the largest finite number this type can represent
impl<'a, S> Rem<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Rem<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn rem(self, other: &'a Deg<S>) -> Deg<S>
Performs the %
operation.
impl<'a, 'b, S> Rem<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
[src]
impl<'a, 'b, S> Rem<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the %
operator.
fn rem(self, other: &'a Deg<S>) -> Deg<S>
[src]
fn rem(self, other: &'a Deg<S>) -> Deg<S>
Performs the %
operation.
impl<'a, S> Rem<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Rem<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the %
operator.
fn rem(self, other: Deg<S>) -> Deg<S>
[src]
fn rem(self, other: Deg<S>) -> Deg<S>
Performs the %
operation.
impl<S> Rem<Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Rem<Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the %
operator.
fn rem(self, other: Deg<S>) -> Deg<S>
[src]
fn rem(self, other: Deg<S>) -> Deg<S>
Performs the %
operation.
impl<S> SubAssign<Deg<S>> for Deg<S> where
S: BaseFloat + SubAssign<S>,
[src]
impl<S> SubAssign<Deg<S>> for Deg<S> where
S: BaseFloat + SubAssign<S>,
fn sub_assign(&mut self, other: Deg<S>)
[src]
fn sub_assign(&mut self, other: Deg<S>)
Performs the -=
operation.
impl<S> DivAssign<S> for Deg<S> where
S: BaseFloat + DivAssign<S>,
[src]
impl<S> DivAssign<S> for Deg<S> where
S: BaseFloat + DivAssign<S>,
fn div_assign(&mut self, scalar: S)
[src]
fn div_assign(&mut self, scalar: S)
Performs the /=
operation.
impl<S> Copy for Deg<S> where
S: Copy,
[src]
impl<S> Copy for Deg<S> where
S: Copy,
impl<S> PartialEq<Deg<S>> for Deg<S> where
S: PartialEq<S>,
[src]
impl<S> PartialEq<Deg<S>> for Deg<S> where
S: PartialEq<S>,
fn eq(&self, other: &Deg<S>) -> bool
[src]
fn eq(&self, other: &Deg<S>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Deg<S>) -> bool
[src]
fn ne(&self, other: &Deg<S>) -> bool
This method tests for !=
.
impl<'a, 'b, S> Div<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
[src]
impl<'a, 'b, S> Div<&'a Deg<S>> for &'b Deg<S> where
S: BaseFloat,
type Output = S
The resulting type after applying the /
operator.
fn div(self, other: &'a Deg<S>) -> S
[src]
fn div(self, other: &'a Deg<S>) -> S
Performs the /
operation.
impl<S> Div<S> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Div<S> for Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Deg<S>
[src]
fn div(self, other: S) -> Deg<S>
Performs the /
operation.
impl<'a, S> Div<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Div<Deg<S>> for &'a Deg<S> where
S: BaseFloat,
type Output = S
The resulting type after applying the /
operator.
fn div(self, other: Deg<S>) -> S
[src]
fn div(self, other: Deg<S>) -> S
Performs the /
operation.
impl<'a, S> Div<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Div<&'a Deg<S>> for Deg<S> where
S: BaseFloat,
type Output = S
The resulting type after applying the /
operator.
fn div(self, other: &'a Deg<S>) -> S
[src]
fn div(self, other: &'a Deg<S>) -> S
Performs the /
operation.
impl<'a, S> Div<S> for &'a Deg<S> where
S: BaseFloat,
[src]
impl<'a, S> Div<S> for &'a Deg<S> where
S: BaseFloat,
type Output = Deg<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Deg<S>
[src]
fn div(self, other: S) -> Deg<S>
Performs the /
operation.
impl<S> Div<Deg<S>> for Deg<S> where
S: BaseFloat,
[src]
impl<S> Div<Deg<S>> for Deg<S> where
S: BaseFloat,