Skip to main content

RoundFloat

Trait RoundFloat 

Source
pub trait RoundFloat {
    // Required method
    fn round(&self) -> Self;
}
Expand description

Types implementing this trait can be rounded to the nearest integer value. In the case of vectors or other types containing multiple elements, each element will be individually rounded.

Required Methods§

Source

fn round(&self) -> Self

Round this value to the nearest integer. In the case of vectors or other types containing multiple elements, each element will be individually rounded.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RoundFloat for f32

Source§

fn round(&self) -> Self

Source§

impl RoundFloat for f64

Source§

fn round(&self) -> Self

Implementors§