pub trait Constants {
    // Required methods
    unsafe fn π() -> Self;
    unsafe fn ε() -> Self;
    unsafe fn e() -> Self;
}
Expand description

Float constants.

Required Methods§

source

unsafe fn π() -> Self

returns π

Safety

Refer to Self’s safety documentation. This function is unsafe only when used with a FFloat; Calling it with a f64 or a f32 is safe.

source

unsafe fn ε() -> Self

returns ε

Safety

Refer to Self’s safety documentation. This function is unsafe only when used with a FFloat; Calling it with a f64 or a f32 is safe.

source

unsafe fn e() -> Self

returns E (euler’s number)

Safety

Refer to Self’s safety documentation. This function is unsafe only when used with a FFloat; Calling it with a f64 or a f32 is safe.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Constants for f32

source§

unsafe fn π() -> f32

source§

unsafe fn e() -> f32

source§

unsafe fn ε() -> f32

source§

impl Constants for f64

source§

unsafe fn π() -> f64

source§

unsafe fn e() -> f64

source§

unsafe fn ε() -> f64

Implementors§

source§

impl<F: FastFloat + Constants> Constants for FFloat<F>