Trait zng_layout::unit::euclid::num::Round

pub trait Round: Copy {
    // Required method
    fn round(self) -> Self;
}
Expand description

Defines the nearest integer value to the original value.

Required Methods§

fn round(self) -> Self

Rounds to the nearest integer value.

This behavior is preserved for negative values (unlike the basic cast).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl Round for f32

§

fn round(self) -> f32

§

impl Round for f64

§

fn round(self) -> f64

§

impl Round for i16

§

fn round(self) -> i16

§

impl Round for i32

§

fn round(self) -> i32

§

impl Round for i64

§

fn round(self) -> i64

§

impl Round for isize

§

fn round(self) -> isize

§

impl Round for u16

§

fn round(self) -> u16

§

impl Round for u32

§

fn round(self) -> u32

§

impl Round for u64

§

fn round(self) -> u64

§

impl Round for usize

§

fn round(self) -> usize

Implementors§

source§

impl Round for Dip

source§

impl Round for Px

§

impl<T, U> Round for Point2D<T, U>
where T: Round,

§

impl<T, U> Round for Point3D<T, U>
where T: Round,

§

impl<T, U> Round for Size2D<T, U>
where T: Round,

§

impl<T, U> Round for Size3D<T, U>
where T: Round,

§

impl<T, U> Round for Vector2D<T, U>
where T: Round,

§

impl<T, U> Round for Vector3D<T, U>
where T: Round,