[][src]Trait euclid::Trig

pub trait Trig {
    fn sin(self) -> Self;
fn cos(self) -> Self;
fn tan(self) -> Self;
fn fast_atan2(y: Self, x: Self) -> Self;
fn degrees_to_radians(deg: Self) -> Self;
fn radians_to_degrees(rad: Self) -> Self; }

Trait for basic trigonometry functions, so they can be used on generic numeric types

Required methods

fn sin(self) -> Self

fn cos(self) -> Self

fn tan(self) -> Self

fn fast_atan2(y: Self, x: Self) -> Self

fn degrees_to_radians(deg: Self) -> Self

fn radians_to_degrees(rad: Self) -> Self

Loading content...

Implementations on Foreign Types

impl Trig for f32[src]

fn fast_atan2(y: f32, x: f32) -> f32[src]

A slightly faster approximation of atan2.

Note that it does not deal with the case where both x and y are 0.

impl Trig for f64[src]

fn fast_atan2(y: f64, x: f64) -> f64[src]

A slightly faster approximation of atan2.

Note that it does not deal with the case where both x and y are 0.

Loading content...

Implementors

Loading content...