[−][src]Struct lyon_geom::Angle
An angle in radians. An angle in radians
Fields
radians: T
Implementations
impl<T> Angle<T>
[src]
An angle in radians.
impl<T> Angle<T> where
T: Trig,
[src]
T: Trig,
An angle in radians.
pub fn degrees(deg: T) -> Angle<T>
[src]
pub fn to_degrees(self) -> T
[src]
impl<T> Angle<T> where
T: Sub<T, Output = T> + Rem<T, Output = T> + Add<T, Output = T> + Zero + FloatConst + PartialOrd<T> + Copy,
[src]
T: Sub<T, Output = T> + Rem<T, Output = T> + Add<T, Output = T> + Zero + FloatConst + PartialOrd<T> + Copy,
An angle in radians.
pub fn positive(&self) -> Angle<T>
[src]
Returns this angle in the [0..2*PI[ range.
pub fn signed(&self) -> Angle<T>
[src]
Returns this angle in the ]-PI..PI] range.
impl<T> Angle<T> where
T: Rem<T, Output = T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + One + FloatConst + Copy,
[src]
T: Rem<T, Output = T> + Sub<T, Output = T> + Add<T, Output = T> + Mul<T, Output = T> + One + FloatConst + Copy,
An angle in radians.
pub fn angle_to(&self, to: Angle<T>) -> Angle<T>
[src]
Returns the shortest signed angle between two angles.
Takes wrapping and signs into account.
pub fn lerp(&self, other: Angle<T>, t: T) -> Angle<T>
[src]
Linear interpolation between two angles, using the shortest path.
impl<T> Angle<T> where
T: Float,
[src]
T: Float,
An angle in radians.
impl<T> Angle<T> where
T: Zero,
[src]
T: Zero,
An angle in radians.
impl<T> Angle<T> where
T: FloatConst + Add<T, Output = T>,
[src]
T: FloatConst + Add<T, Output = T>,
An angle in radians.
pub fn pi() -> Angle<T>
[src]
pub fn two_pi() -> Angle<T>
[src]
pub fn frac_pi_2() -> Angle<T>
[src]
pub fn frac_pi_3() -> Angle<T>
[src]
pub fn frac_pi_4() -> Angle<T>
[src]
impl<T> Angle<T> where
T: NumCast + Copy,
[src]
T: NumCast + Copy,
An angle in radians.
pub fn cast<NewT>(&self) -> Angle<NewT> where
NewT: NumCast,
[src]
NewT: NumCast,
Cast from one numeric representation to another.
pub fn try_cast<NewT>(&self) -> Option<Angle<NewT>> where
NewT: NumCast,
[src]
NewT: NumCast,
Fallible cast from one numeric representation to another.
pub fn to_f32(&self) -> Angle<f32>
[src]
Cast angle to f32
.
pub fn to_f64(&self) -> Angle<f64>
[src]
Cast angle f64
.
Trait Implementations
impl<T> Add<Angle<T>> for Angle<T> where
T: Add<T, Output = T>,
[src]
T: Add<T, Output = T>,
type Output = Angle<T>
The resulting type after applying the +
operator.
pub fn add(self, other: Angle<T>) -> Angle<T>
[src]
impl<T> AddAssign<Angle<T>> for Angle<T> where
T: AddAssign<T>,
[src]
T: AddAssign<T>,
pub fn add_assign(&mut self, other: Angle<T>)
[src]
impl<T> ApproxEq<T> for Angle<T> where
T: ApproxEq<T>,
[src]
T: ApproxEq<T>,
pub fn approx_epsilon() -> T
[src]
pub fn approx_eq_eps(&self, other: &Angle<T>, approx_epsilon: &T) -> bool
[src]
pub fn approx_eq(&self, other: &Self) -> bool
[src]
impl<T> Clone for Angle<T> where
T: Clone,
[src]
T: Clone,
impl<T> Copy for Angle<T> where
T: Copy,
[src]
T: Copy,
impl<T> Debug for Angle<T> where
T: Debug,
[src]
T: Debug,
impl<T> Default for Angle<T> where
T: Default,
[src]
T: Default,
impl<T> Div<Angle<T>> for Angle<T> where
T: Div<T, Output = T>,
[src]
T: Div<T, Output = T>,
type Output = T
The resulting type after applying the /
operator.
pub fn div(self, other: Angle<T>) -> T
[src]
impl<T> Div<T> for Angle<T> where
T: Div<T, Output = T>,
[src]
T: Div<T, Output = T>,
type Output = Angle<T>
The resulting type after applying the /
operator.
pub fn div(self, factor: T) -> Angle<T>
[src]
impl<T> DivAssign<T> for Angle<T> where
T: DivAssign<T>,
[src]
T: DivAssign<T>,
pub fn div_assign(&mut self, factor: T)
[src]
impl<T> Eq for Angle<T> where
T: Eq,
[src]
T: Eq,
impl<T> Hash for Angle<T> where
T: Hash,
[src]
T: Hash,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Mul<T> for Angle<T> where
T: Mul<T, Output = T>,
[src]
T: Mul<T, Output = T>,
type Output = Angle<T>
The resulting type after applying the *
operator.
pub fn mul(self, factor: T) -> Angle<T>
[src]
impl<T> MulAssign<T> for Angle<T> where
T: MulAssign<T>,
[src]
T: MulAssign<T>,
pub fn mul_assign(&mut self, factor: T)
[src]
impl<T> Neg for Angle<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Angle<T>
The resulting type after applying the -
operator.
pub fn neg(self) -> Angle<T>
[src]
impl<T> PartialEq<Angle<T>> for Angle<T> where
T: PartialEq<T>,
[src]
T: PartialEq<T>,
impl<T> PartialOrd<Angle<T>> for Angle<T> where
T: PartialOrd<T>,
[src]
T: PartialOrd<T>,
pub fn partial_cmp(&self, other: &Angle<T>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Angle<T>) -> bool
[src]
pub fn le(&self, other: &Angle<T>) -> bool
[src]
pub fn gt(&self, other: &Angle<T>) -> bool
[src]
pub fn ge(&self, other: &Angle<T>) -> bool
[src]
impl<T> StructuralEq for Angle<T>
[src]
impl<T> StructuralPartialEq for Angle<T>
[src]
impl<T> Sub<Angle<T>> for Angle<T> where
T: Sub<T, Output = T>,
[src]
T: Sub<T, Output = T>,
type Output = Angle<T>
The resulting type after applying the -
operator.
pub fn sub(self, other: Angle<T>) -> <Angle<T> as Sub<Angle<T>>>::Output
[src]
impl<T> SubAssign<Angle<T>> for Angle<T> where
T: SubAssign<T>,
[src]
T: SubAssign<T>,
pub fn sub_assign(&mut self, other: Angle<T>)
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Angle<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Angle<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Angle<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Angle<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Angle<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,