Trait fixed_math::traits::SinCos

source ·
pub trait SinCoswhere
    Self: Sized,{
    // Required methods
    fn sin_cos(self) -> (Self, Self);
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn tan(self) -> Option<Self>;
}
Expand description

Calculation of sine, cosine and tangent for number in degrees.

Required Methods§

source

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

Simultaneously calculate sinus and cosinus, returns (sin(self), cos(self)).

source

fn sin(self) -> Self

Calculate sinus. sin_cos should be used instead when both sinus and cosinus are needed.

source

fn cos(self) -> Self

Calculate cosinus. sin_cos should be used instead when both sinus and cosinus are needed.

source

fn tan(self) -> Option<Self>

Calculate tangent if it exists

Implementations on Foreign Types§

source§

impl<N> SinCos for FixedI16<N>where N: LeEqU16 + IsLessOrEqual<U6, Output = True>,

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

source§

impl<N> SinCos for FixedI32<N>where N: LeEqU32 + IsLessOrEqual<U22, Output = True>,

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

source§

impl<N> SinCos for FixedI64<N>where N: LeEqU64 + IsLessOrEqual<U54, Output = True>,

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

source§

impl SinCos for f32

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

source§

impl<N> SinCos for FixedI128<N>where N: LeEqU128 + IsLessOrEqual<U118, Output = True>,

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

source§

impl SinCos for f64

source§

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

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn tan(self) -> Option<Self>

Implementors§