Trait figures::Round

source ·
pub trait Round {
    // Required methods
    fn round(self) -> Self;
    fn ceil(self) -> Self;
    fn floor(self) -> Self;
}
Expand description

Functionality for rounding values to whole numbers.

Required Methods§

source

fn round(self) -> Self

Returns self rounded to the nearest whole number.

source

fn ceil(self) -> Self

Returns self raised to the next whole number further away from 0.

source

fn floor(self) -> Self

Returns self lowered to the next whole number closer to 0.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Round for f32

source§

fn round(self) -> Self

source§

fn ceil(self) -> Self

source§

fn floor(self) -> Self

Implementors§

source§

impl Round for Lp

source§

impl Round for Px

source§

impl Round for UPx

source§

impl<Unit> Round for Point<Unit>where Unit: Round,

source§

impl<Unit> Round for Size<Unit>where Unit: Round,