cosmic::cosmic_theme::palette::num

Trait Trigonometry

source
pub trait Trigonometry: Sized {
    // Required methods
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn sin_cos(self) -> (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

Trigonometry methods and their inverses.

Required Methods§

source

fn sin(self) -> Self

Compute the sine of self (in radians).

source

fn cos(self) -> Self

Compute the cosine of self (in radians).

source

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

Simultaneously compute the sine and cosine of self (in radians). Returns (sin(self), cos(self)).

source

fn tan(self) -> Self

Compute the tangent of self (in radians).

source

fn asin(self) -> Self

Compute the arcsine in radians of self.

source

fn acos(self) -> Self

Compute the arccosine in radians of self.

source

fn atan(self) -> Self

Compute the arctangent in radians of self.

source

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

Compute the arctangent in radians of self (y) and other (x).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Trigonometry for f32

source§

fn sin(self) -> f32

source§

fn cos(self) -> f32

source§

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

source§

fn tan(self) -> f32

source§

fn asin(self) -> f32

source§

fn acos(self) -> f32

source§

fn atan(self) -> f32

source§

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

source§

impl Trigonometry for f64

source§

fn sin(self) -> f64

source§

fn cos(self) -> f64

source§

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

source§

fn tan(self) -> f64

source§

fn asin(self) -> f64

source§

fn acos(self) -> f64

source§

fn atan(self) -> f64

source§

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

Implementors§