Trait Real

Source
pub trait Real: Num + Copy {
    const PI: Self;

    // Required methods
    fn signum(self) -> Self;
    fn floor(self) -> Self;
    fn ceil(self) -> Self;
    fn sqrt(self) -> Self;
    fn tan(self) -> Self;
    fn sin(self) -> Self;
    fn cos(self) -> Self;
    fn atan2(y: Self, x: Self) -> Self;
    fn as_f32(self) -> f32;

    // Provided method
    fn sin_cos(self) -> (Self, Self) { ... }
}

Required Associated Constants§

Source

const PI: Self

Required Methods§

Source

fn signum(self) -> Self

Source

fn floor(self) -> Self

Source

fn ceil(self) -> Self

Source

fn sqrt(self) -> Self

Source

fn tan(self) -> Self

Source

fn sin(self) -> Self

Source

fn cos(self) -> Self

Source

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

Source

fn as_f32(self) -> f32

Provided Methods§

Source

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

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.

Implementors§

Source§

impl<T> Real for RealImpl<T>
where T: Float,