Trait cgmath::Angle

source ·
pub trait Anglewhere
    Self: Copy + Clone + PartialEq + PartialOrd + ApproxEq<Epsilon = Self::Unitless> + Neg<Output = Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + Rem<Self, Output = Self> + Mul<Self::Unitless, Output = Self> + Div<Self, Output = Self::Unitless> + Div<Self::Unitless, Output = Self>,{
    type Unitless: BaseFloat;

Show 22 methods // Required methods fn new(value: Self::Unitless) -> Self; fn zero() -> Self; fn full_turn() -> Self; fn turn_div_2() -> Self; fn turn_div_3() -> Self; fn turn_div_4() -> Self; fn turn_div_6() -> Self; fn sin(self) -> Self::Unitless; fn cos(self) -> Self::Unitless; fn tan(self) -> Self::Unitless; fn sin_cos(self) -> (Self::Unitless, Self::Unitless); fn asin(a: Self::Unitless) -> Self; fn acos(a: Self::Unitless) -> Self; fn atan(a: Self::Unitless) -> Self; fn atan2(a: Self::Unitless, b: Self::Unitless) -> Self; // Provided methods fn normalize(self) -> Self { ... } fn opposite(self) -> Self { ... } fn bisect(self, other: Self) -> Self { ... } fn equiv(&self, other: &Self) -> bool { ... } fn cot(self) -> Self::Unitless { ... } fn sec(self) -> Self::Unitless { ... } fn csc(self) -> Self::Unitless { ... }
}
Expand description

Operations on angles.

Required Associated Types§

Required Methods§

source

fn new(value: Self::Unitless) -> Self

Create an angle from a unitless value.

source

fn zero() -> Self

source

fn full_turn() -> Self

source

fn turn_div_2() -> Self

source

fn turn_div_3() -> Self

source

fn turn_div_4() -> Self

source

fn turn_div_6() -> Self

source

fn sin(self) -> Self::Unitless

source

fn cos(self) -> Self::Unitless

source

fn tan(self) -> Self::Unitless

source

fn sin_cos(self) -> (Self::Unitless, Self::Unitless)

source

fn asin(a: Self::Unitless) -> Self

source

fn acos(a: Self::Unitless) -> Self

source

fn atan(a: Self::Unitless) -> Self

source

fn atan2(a: Self::Unitless, b: Self::Unitless) -> Self

Provided Methods§

source

fn normalize(self) -> Self

Return the angle, normalized to the range [0, full_turn).

source

fn opposite(self) -> Self

Return the angle rotated by half a turn

source

fn bisect(self, other: Self) -> Self

Returns the interior bisector of the two angles

source

fn equiv(&self, other: &Self) -> bool

source

fn cot(self) -> Self::Unitless

source

fn sec(self) -> Self::Unitless

source

fn csc(self) -> Self::Unitless

Implementors§

source§

impl<S: BaseFloat> Angle for Deg<S>

§

type Unitless = S

source§

impl<S: BaseFloat> Angle for Rad<S>

§

type Unitless = S