Category

Trait Category 

Source
pub trait Category {
    type D;

    // Required method
    fn category(&self) -> Self::D;
}

Required Associated Types§

Source

type D

Type returned from destructure. Should probably be CatFloat

Required Methods§

Source

fn category(&self) -> Self::D

Splits an f64 into its Integer and Fractional parts.

§Examples:
let n: f64 = 1.5;
assert_eq!(n.category(), CatFloat::IntegerAndFractionalPart(1.0, 0.5));

Implementations on Foreign Types§

Source§

impl Category for f64

Source§

type D = CatFloat

Source§

fn category(&self) -> Self::D

Implementors§