alloy::math

Trait Trig

source
pub trait Trig: Sealed {
    // Required methods
    fn sin(self) -> f32;
    fn cos(self) -> f32;
    fn tan(self) -> f32;
    fn sin_cos(self) -> (f32, f32);
    fn asin(value: f32) -> Self;
    fn acos(value: f32) -> Self;
    fn atan(value: f32) -> Self;
}
Expand description

A closed trait used to provide trigonmetric functionalities to angular types.

Note: This may become unsealed in a future update

Required Methods§

source

fn sin(self) -> f32

Computes the sine of this angle.

source

fn cos(self) -> f32

Computes the cosine of this angle.

source

fn tan(self) -> f32

Computes the tangent of this angle.

source

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

Computes the sine and tangent of this angle.

source

fn asin(value: f32) -> Self

Computes the arc-sine of the input value, returning the Angle

§Parameters
  • value - the value to compute the arc-sine of
source

fn acos(value: f32) -> Self

Computes the arc-cosine of the input value, returning the Angle

§Parameters
  • value - the value to compute the arc-cosine of
source

fn atan(value: f32) -> Self

Computes the arc-tangent of the input value, returning the Angle

§Parameters
  • value - the value to compute the arc-tangent of

Object Safety§

This trait is not object safe.

Implementors§