Trait palette::num::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) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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 Trigonometry for f64

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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 Trigonometry for f32x4

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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 Trigonometry for f32x8

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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 Trigonometry for f64x2

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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 Trigonometry for f64x4

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

fn sin_cos(self) -> (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§