Struct euclid::Angle [−][src]
pub struct Angle<T> { pub radians: T, }
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: 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: 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: PartialEq> PartialEq for Angle<T>
[src]
impl<T: PartialEq> PartialEq 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 for Angle<T>
[src]
impl<T: PartialOrd> PartialOrd 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: 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: Clone + Add<T, Output = T>> Add for Angle<T>
[src]
impl<T: Clone + Add<T, Output = T>> Add 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 + AddAssign<T>> AddAssign for Angle<T>
[src]
impl<T: Clone + AddAssign<T>> AddAssign 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 + 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 + SubAssign<T>> SubAssign for Angle<T>
[src]
impl<T: Clone + SubAssign<T>> SubAssign 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 + 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: 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: 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 + 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: Neg<Output = T>> Neg for Angle<T>
[src]
impl<T: Neg<Output = T>> Neg for Angle<T>