[−][src]Struct euclid::Angle
An angle in radians
Fields
radians: T
Methods
impl<T> Angle<T>
[src]
impl<T> Angle<T>
impl<T> Angle<T> where
T: Trig,
[src]
impl<T> Angle<T> where
T: Trig,
pub fn degrees(deg: T) -> Self
[src]
pub fn degrees(deg: T) -> Self
pub fn to_degrees(self) -> T
[src]
pub fn to_degrees(self) -> T
impl<T> Angle<T> where
T: Rem<Output = T> + Sub<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy,
[src]
impl<T> Angle<T> where
T: Rem<Output = T> + Sub<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy,
pub fn positive(&self) -> Self
[src]
pub fn positive(&self) -> Self
Returns this angle in the [0..2*PI[ range.
pub fn signed(&self) -> Self
[src]
pub fn signed(&self) -> Self
Returns this angle in the ]-PI..PI] range.
impl<T> Angle<T> where
T: Float,
[src]
impl<T> Angle<T> where
T: Float,
impl<T> Angle<T> where
T: Zero,
[src]
impl<T> Angle<T> where
T: Zero,
impl<T> Angle<T> where
T: FloatConst + Add<Output = T>,
[src]
impl<T> Angle<T> where
T: FloatConst + Add<Output = T>,
pub fn pi() -> Self
[src]
pub fn pi() -> Self
pub fn two_pi() -> Self
[src]
pub fn two_pi() -> Self
pub fn frac_pi_2() -> Self
[src]
pub fn frac_pi_2() -> Self
pub fn frac_pi_3() -> Self
[src]
pub fn frac_pi_3() -> Self
pub fn frac_pi_4() -> Self
[src]
pub fn frac_pi_4() -> Self
Trait Implementations
impl<T: PartialEq> PartialEq<Angle<T>> for Angle<T>
[src]
impl<T: PartialEq> PartialEq<Angle<T>> for Angle<T>
fn eq(&self, other: &Angle<T>) -> bool
[src]
fn eq(&self, other: &Angle<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Angle<T>) -> bool
[src]
fn ne(&self, other: &Angle<T>) -> bool
This method tests for !=
.
impl<T: Eq> Eq for Angle<T>
[src]
impl<T: Eq> Eq for Angle<T>
impl<T: PartialOrd> PartialOrd<Angle<T>> for Angle<T>
[src]
impl<T: PartialOrd> PartialOrd<Angle<T>> for Angle<T>
fn partial_cmp(&self, other: &Angle<T>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Angle<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Angle<T>) -> bool
[src]
fn lt(&self, other: &Angle<T>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Angle<T>) -> bool
[src]
fn le(&self, other: &Angle<T>) -> 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: &Angle<T>) -> bool
[src]
fn gt(&self, other: &Angle<T>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Angle<T>) -> bool
[src]
fn ge(&self, other: &Angle<T>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Debug> Debug for Angle<T>
[src]
impl<T: Debug> Debug for Angle<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Clone + Sub<T, Output = T>> Sub<Angle<T>> for Angle<T>
[src]
impl<T: Clone + Sub<T, Output = T>> Sub<Angle<T>> for Angle<T>
type Output = Angle<T>
The resulting type after applying the -
operator.
fn sub(self, other: Angle<T>) -> Self::Output
[src]
fn sub(self, other: Angle<T>) -> Self::Output
Performs the -
operation.
impl<T: Clone + Add<T, Output = T>> Add<Angle<T>> for Angle<T>
[src]
impl<T: Clone + Add<T, Output = T>> Add<Angle<T>> for Angle<T>
type Output = Angle<T>
The resulting type after applying the +
operator.
fn add(self, other: Angle<T>) -> Angle<T>
[src]
fn add(self, other: Angle<T>) -> Angle<T>
Performs the +
operation.
impl<T: Clone + Mul<T, Output = T>> Mul<T> for Angle<T>
[src]
impl<T: Clone + Mul<T, Output = T>> Mul<T> for Angle<T>
type Output = Angle<T>
The resulting type after applying the *
operator.
fn mul(self, factor: T) -> Angle<T>
[src]
fn mul(self, factor: T) -> Angle<T>
Performs the *
operation.
impl<T: Clone + Div<T, Output = T>> Div<Angle<T>> for Angle<T>
[src]
impl<T: Clone + Div<T, Output = T>> Div<Angle<T>> for Angle<T>
type Output = T
The resulting type after applying the /
operator.
fn div(self, other: Angle<T>) -> T
[src]
fn div(self, other: Angle<T>) -> T
Performs the /
operation.
impl<T: Clone + Div<T, Output = T>> Div<T> for Angle<T>
[src]
impl<T: Clone + Div<T, Output = T>> Div<T> for Angle<T>
type Output = Angle<T>
The resulting type after applying the /
operator.
fn div(self, factor: T) -> Angle<T>
[src]
fn div(self, factor: T) -> Angle<T>
Performs the /
operation.
impl<T: Neg<Output = T>> Neg for Angle<T>
[src]
impl<T: Neg<Output = T>> Neg for Angle<T>
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self
[src]
fn neg(self) -> Self
Performs the unary -
operation.
impl<T: Clone + AddAssign<T>> AddAssign<Angle<T>> for Angle<T>
[src]
impl<T: Clone + AddAssign<T>> AddAssign<Angle<T>> for Angle<T>
fn add_assign(&mut self, other: Angle<T>)
[src]
fn add_assign(&mut self, other: Angle<T>)
Performs the +=
operation.
impl<T: Clone + SubAssign<T>> SubAssign<Angle<T>> for Angle<T>
[src]
impl<T: Clone + SubAssign<T>> SubAssign<Angle<T>> for Angle<T>
fn sub_assign(&mut self, other: Angle<T>)
[src]
fn sub_assign(&mut self, other: Angle<T>)
Performs the -=
operation.
impl<T: Clone + MulAssign<T>> MulAssign<T> for Angle<T>
[src]
impl<T: Clone + MulAssign<T>> MulAssign<T> for Angle<T>
fn mul_assign(&mut self, factor: T)
[src]
fn mul_assign(&mut self, factor: T)
Performs the *=
operation.
impl<T: Clone + DivAssign<T>> DivAssign<T> for Angle<T>
[src]
impl<T: Clone + DivAssign<T>> DivAssign<T> for Angle<T>
fn div_assign(&mut self, factor: T)
[src]
fn div_assign(&mut self, factor: T)
Performs the /=
operation.
impl<T: Hash> Hash for Angle<T>
[src]
impl<T: Hash> Hash for Angle<T>
fn hash<__HT: Hasher>(&self, state: &mut __HT)
[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Copy> Copy for Angle<T>
[src]
impl<T: Copy> Copy for Angle<T>
impl<T: Clone> Clone for Angle<T>
[src]
impl<T: Clone> Clone for Angle<T>
fn clone(&self) -> Angle<T>
[src]
fn clone(&self) -> Angle<T>
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<T> Serialize for Angle<T> where
T: Serialize,
[src]
impl<T> Serialize for Angle<T> where
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de, T> Deserialize<'de> for Angle<T> where
T: Deserialize<'de>,
[src]
impl<'de, T> Deserialize<'de> for Angle<T> where
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
fn deserialize_in_place<__D>(
__deserializer: __D,
__place: &mut Self
) -> Result<(), __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize_in_place<__D>(
__deserializer: __D,
__place: &mut Self
) -> Result<(), __D::Error> where
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,