Trait Float

Source
pub trait Float:
    'static
    + Sized
    + NumFloat
    + FloatConst
    + FromPrimitive
    + PartialOrd
    + Sum
    + ValueFrom<u32>
    + ValueFrom<usize>
    + ValueFrom<f32>
    + ValueInto<f64>
    + ApproxFrom<usize>
    + ApproxFrom<f64>
    + ApproxInto<u32, RoundToNearest>
    + ApproxInto<usize, RoundToNearest>
    + ApproxInto<f32>
    + ApproxInto<f64>
    + Clone
    + Copy
    + Send
    + Sync
    + AddAssign
    + MulAssign
    + DivAssign
    + ScalarOperand
    + Display
    + Debug
    + LowerExp
    + FftwFloat
    + DeserializeOwned
    + Serialize
    + JsonSchema {
    // Required methods
    fn half() -> Self;
    fn two() -> Self;
    fn three() -> Self;
    fn four() -> Self;
    fn five() -> Self;
    fn ten() -> Self;
    fn hundred() -> Self;
    fn array0_unity() -> &'static Array0<Self>;
}
Expand description

Floating number trait, it is implemented for f32 and f64 only

Required Methods§

Source

fn half() -> Self

Source

fn two() -> Self

Source

fn three() -> Self

Source

fn four() -> Self

Source

fn five() -> Self

Source

fn ten() -> Self

Source

fn hundred() -> Self

Source

fn array0_unity() -> &'static Array0<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.

Implementations on Foreign Types§

Source§

impl Float for f32

Source§

fn half() -> Self

Source§

fn two() -> Self

Source§

fn three() -> Self

Source§

fn four() -> Self

Source§

fn five() -> Self

Source§

fn ten() -> Self

Source§

fn hundred() -> Self

Source§

fn array0_unity() -> &'static Array0<Self>

Source§

impl Float for f64

Source§

fn half() -> Self

Source§

fn two() -> Self

Source§

fn three() -> Self

Source§

fn four() -> Self

Source§

fn five() -> Self

Source§

fn ten() -> Self

Source§

fn hundred() -> Self

Source§

fn array0_unity() -> &'static Array0<Self>

Implementors§