Trait palette::num::Round

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

Methods for rounding numbers to integers.

Required Methods§

source

fn round(self) -> Self

Return the nearest integer to self. Round half-way cases away from 0.0.

source

fn floor(self) -> Self

Return the largest integer less than or equal to self.

source

fn ceil(self) -> Self

Return the smallest integer greater than or equal to self.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Round for f32

source§

fn round(self) -> Self

source§

fn floor(self) -> Self

source§

fn ceil(self) -> Self

source§

impl Round for f64

source§

fn round(self) -> Self

source§

fn floor(self) -> Self

source§

fn ceil(self) -> Self

Implementors§