pub struct Angle<T> {
pub radians: T,
}Expand description
An angle in radians
Fields§
§radians: TImplementations§
Source§impl<T> Angle<T>where
T: Trig,
impl<T> Angle<T>where
T: Trig,
pub fn degrees(deg: T) -> Angle<T>
pub fn to_degrees(self) -> T
Source§impl<T> Angle<T>where
T: Sub<Output = T> + Rem<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy,
impl<T> Angle<T>where
T: Sub<Output = T> + Rem<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy,
Source§impl<T> Angle<T>where
T: FloatConst + Add<Output = T>,
impl<T> Angle<T>where
T: FloatConst + Add<Output = T>,
Trait Implementations§
Source§impl<T> AddAssign for Angle<T>where
T: AddAssign,
impl<T> AddAssign for Angle<T>where
T: AddAssign,
Source§fn add_assign(&mut self, other: Angle<T>)
fn add_assign(&mut self, other: Angle<T>)
Performs the
+= operation. Read moreSource§impl<T> ApproxEq<T> for Angle<T>where
T: ApproxEq<T>,
impl<T> ApproxEq<T> for Angle<T>where
T: ApproxEq<T>,
Source§fn approx_epsilon() -> T
fn approx_epsilon() -> T
Default epsilon value
Source§fn approx_eq_eps(&self, other: &Angle<T>, approx_epsilon: &T) -> bool
fn approx_eq_eps(&self, other: &Angle<T>, approx_epsilon: &T) -> bool
Returns
true if this object is approximately equal to the other one, using
a provided epsilon value.Source§fn approx_eq(&self, other: &Self) -> bool
fn approx_eq(&self, other: &Self) -> bool
Returns
true if this object is approximately equal to the other one, using
the approx_epsilon epsilon value.Source§impl<'de, T> Deserialize<'de> for Angle<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Angle<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Angle<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Angle<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> DivAssign<T> for Angle<T>where
T: DivAssign,
impl<T> DivAssign<T> for Angle<T>where
T: DivAssign,
Source§fn div_assign(&mut self, factor: T)
fn div_assign(&mut self, factor: T)
Performs the
/= operation. Read moreSource§impl<T> MulAssign<T> for Angle<T>where
T: MulAssign,
impl<T> MulAssign<T> for Angle<T>where
T: MulAssign,
Source§fn mul_assign(&mut self, factor: T)
fn mul_assign(&mut self, factor: T)
Performs the
*= operation. Read moreSource§impl<T> PartialOrd for Angle<T>where
T: PartialOrd,
impl<T> PartialOrd for Angle<T>where
T: PartialOrd,
Source§impl<T> Serialize for Angle<T>where
T: Serialize,
impl<T> Serialize for Angle<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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<T> SubAssign for Angle<T>where
T: SubAssign,
impl<T> SubAssign for Angle<T>where
T: SubAssign,
Source§fn sub_assign(&mut self, other: Angle<T>)
fn sub_assign(&mut self, other: Angle<T>)
Performs the
-= operation. Read moreimpl<T> Copy for Angle<T>where
T: Copy,
impl<T> Eq for Angle<T>where
T: Eq,
impl<T> Pod for Angle<T>where
T: Pod,
impl<T> StructuralPartialEq for Angle<T>
Auto Trait Implementations§
impl<T> Freeze for Angle<T>where
T: Freeze,
impl<T> RefUnwindSafe for Angle<T>where
T: RefUnwindSafe,
impl<T> Send for Angle<T>where
T: Send,
impl<T> Sync for Angle<T>where
T: Sync,
impl<T> Unpin for Angle<T>where
T: Unpin,
impl<T> UnwindSafe for Angle<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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