Trait cosmic::cosmic_theme::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) -> f32

source§

fn floor(self) -> f32

source§

fn ceil(self) -> f32

source§

impl Round for f64

source§

fn round(self) -> f64

source§

fn floor(self) -> f64

source§

fn ceil(self) -> f64

Implementors§