Trait easy_cast::ConvFloat [−][src]
Nearest / floor / ceil conversions from floating point types
This trait is explicitly for conversions from floating-point values to integers.
If the source value is out-of-range or not-a-number then the conversion must fail with a panic.
Required methods
fn conv_nearest(x: T) -> Self
[src]
Convert to the nearest integer
Half-way cases are rounded away from 0
.
fn conv_floor(x: T) -> Self
[src]
Convert the floor to an integer
Returns the largest integer less than or equal to x
.
fn conv_ceil(x: T) -> Self
[src]
Convert the ceiling to an integer
Returns the smallest integer greater than or equal to x
.