Trait SinCos

Source
pub trait SinCos
where 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 sine and cosine, returns (sin(self), cos(self)).

Source

fn sin(self) -> Self

Calculate sine of an angle. sin_cos should be used instead when both sine and cosine are needed.

Source

fn cos(self) -> Self

Calculate cosinus on an angle. sin_cos should be used instead when both sine and cosine are needed.

Source

fn tan(self) -> Option<Self>

Calculate tangent of an angle if it exists.

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 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 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>

Source§

impl<N> SinCos for FixedI8<N>

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 FixedI16<N>

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>

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>

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>

Source§

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

Source§

fn sin(self) -> Self

Source§

fn cos(self) -> Self

Source§

fn tan(self) -> Option<Self>

Implementors§