Trait Trig

Source
pub trait Trig: Sized {
    // Required methods
    fn sin(self) -> Self;
    fn sin_cos(self) -> (Self, Self);
    fn cos(self) -> Self;
    fn tan(self) -> Self;
    fn asin(self) -> Self;
    fn acos(self) -> Self;
    fn atan(self) -> Self;
    fn atan2(self, other: Self) -> Self;
}
Expand description

Trigonometric functions

Required Methods§

Source

fn sin(self) -> Self

Source

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

Source

fn cos(self) -> Self

Source

fn tan(self) -> Self

Source

fn asin(self) -> Self

Source

fn acos(self) -> Self

Source

fn atan(self) -> Self

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Trig for f32

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Source§

impl Trig for f64

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Source§

impl<U> Trig for FixedI8<U>
where U: 'static + Unsigned + IsLessOrEqual<U8, Output = True> + IsLessOrEqual<U6, Output = True> + IsLessOrEqual<U5, Output = True>,

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Source§

impl<U> Trig for FixedI16<U>
where U: 'static + Unsigned + IsLessOrEqual<U16, Output = True> + IsLessOrEqual<U14, Output = True> + IsLessOrEqual<U13, Output = True>,

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Source§

impl<U> Trig for FixedI32<U>
where U: 'static + Unsigned + IsLessOrEqual<U32, Output = True> + IsLessOrEqual<U30, Output = True> + IsLessOrEqual<U29, Output = True>,

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Source§

impl<U> Trig for FixedI64<U>
where U: 'static + Unsigned + IsLessOrEqual<U64, Output = True> + IsLessOrEqual<U62, Output = True> + IsLessOrEqual<U61, Output = True>,

Source§

fn sin(self) -> Self

Source§

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

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Self

Source§

fn asin(self) -> Self

Source§

fn acos(self) -> Self

Source§

fn atan(self) -> Self

Source§

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

Implementors§

Source§

impl<S: Real> Trig for Deg<S>

Source§

impl<S: Real> Trig for Rad<S>

Source§

impl<S: Real> Trig for Turn<S>