Trait easy_cast::CastFloat[][src]

pub trait CastFloat<T> {
    fn cast_nearest(self) -> T;
fn cast_floor(self) -> T;
fn cast_ceil(self) -> T; }

Like Into, but for ConvFloat

Required methods

fn cast_nearest(self) -> T[src]

Cast to the nearest integer

Half-way cases are rounded away from 0.

fn cast_floor(self) -> T[src]

Cast the floor to an integer

Returns the largest integer less than or equal to self.

fn cast_ceil(self) -> T[src]

Cast the ceiling to an integer

Returns the smallest integer greater than or equal to self.

Loading content...

Implementors

impl<S, T: ConvFloat<S>> CastFloat<T> for S[src]

Loading content...