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

Defines the nearest integer value to the original value.

Required Methods§

source

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§

source§

impl Round for f32

source§

fn round(self) -> f32

source§

impl Round for f64

source§

fn round(self) -> f64

source§

impl Round for i16

source§

fn round(self) -> i16

source§

impl Round for i32

source§

fn round(self) -> i32

source§

impl Round for i64

source§

fn round(self) -> i64

source§

impl Round for isize

source§

fn round(self) -> isize

source§

impl Round for u16

source§

fn round(self) -> u16

source§

impl Round for u32

source§

fn round(self) -> u32

source§

impl Round for u64

source§

fn round(self) -> u64

source§

impl Round for usize

source§

fn round(self) -> usize

Implementors§

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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