Skip to main content

Trig

Trait Trig 

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

Trigonometric functions

Required Methods§

Source

fn sin(self) -> S

Source

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

Source

fn cos(self) -> S

Source

fn tan(self) -> S

Source

fn asin(self) -> S

Source

fn acos(self) -> S

Source

fn atan(self) -> S

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Trig<f32> 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<f64> 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<FixedI8<U>> 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<FixedI16<U>> 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<FixedI32<U>> 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<FixedI64<U>> 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<S> for Deg<S>

Source§

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

Source§

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