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> where
T: Trig, [src]
T: Trig,
pub fn degrees(deg: T) -> Self[src]
pub fn to_degrees(self) -> T[src]
impl<T> Angle<T> where
T: Rem<Output = T> + Sub<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy, [src]
T: Rem<Output = T> + Sub<Output = T> + Add<Output = T> + Zero + FloatConst + PartialOrd + Copy,
pub fn positive(&self) -> Self[src]
Returns this angle in the [0..2*PI[ range.
pub fn signed(&self) -> Self[src]
Returns this angle in the ]-PI..PI] range.
impl<T> Angle<T> where
T: Float, [src]
T: Float,
impl<T> Angle<T> where
T: Zero, [src]
T: Zero,
impl<T> Angle<T> where
T: FloatConst + Add<Output = T>, [src]
T: FloatConst + Add<Output = T>,
pub fn pi() -> Self[src]
pub fn two_pi() -> Self[src]
pub fn frac_pi_2() -> Self[src]
pub fn frac_pi_3() -> Self[src]
pub fn frac_pi_4() -> Self[src]
Trait Implementations
impl<T: Copy> Copy for Angle<T>[src]
impl<T: Clone> Clone for Angle<T>[src]
fn clone(&self) -> Angle<T>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: Debug> Debug for Angle<T>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq> PartialEq for Angle<T>[src]
fn eq(&self, __arg_0: &Angle<T>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Angle<T>) -> bool[src]
This method tests for !=.
impl<T: Eq> Eq for Angle<T>[src]
impl<T: PartialOrd> PartialOrd for Angle<T>[src]
fn partial_cmp(&self, __arg_0: &Angle<T>) -> Option<Ordering>[src]
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &Angle<T>) -> bool[src]
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &Angle<T>) -> bool[src]
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &Angle<T>) -> bool[src]
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &Angle<T>) -> bool[src]
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]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)[src]
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]
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]
type Output = Angle<T>
The resulting type after applying the + operator.
fn add(self, other: Angle<T>) -> Angle<T>[src]
Performs the + operation.
impl<T: Clone + AddAssign<T>> AddAssign for Angle<T>[src]
fn add_assign(&mut self, other: Angle<T>)[src]
Performs the += operation.
impl<T: Clone + Sub<T, Output = T>> Sub<Angle<T>> for Angle<T>[src]
type Output = Angle<T>
The resulting type after applying the - operator.
fn sub(self, other: Angle<T>) -> Self::Output[src]
Performs the - operation.
impl<T: Clone + SubAssign<T>> SubAssign for Angle<T>[src]
fn sub_assign(&mut self, other: Angle<T>)[src]
Performs the -= operation.
impl<T: Clone + Div<T, Output = T>> Div<Angle<T>> for Angle<T>[src]
type Output = T
The resulting type after applying the / operator.
fn div(self, other: Angle<T>) -> T[src]
Performs the / operation.
impl<T: Clone + Div<T, Output = T>> Div<T> for Angle<T>[src]
type Output = Angle<T>
The resulting type after applying the / operator.
fn div(self, factor: T) -> Angle<T>[src]
Performs the / operation.
impl<T: Clone + DivAssign<T>> DivAssign<T> for Angle<T>[src]
fn div_assign(&mut self, factor: T)[src]
Performs the /= operation.
impl<T: Clone + Mul<T, Output = T>> Mul<T> for Angle<T>[src]
type Output = Angle<T>
The resulting type after applying the * operator.
fn mul(self, factor: T) -> Angle<T>[src]
Performs the * operation.
impl<T: Clone + MulAssign<T>> MulAssign<T> for Angle<T>[src]
fn mul_assign(&mut self, factor: T)[src]
Performs the *= operation.