Trait Round
pub trait Round: Copy {
// Required method
fn round(self) -> Self;
}
Available on crate feature
geometry
only.Expand description
Defines the nearest integer value to the original value.
Required Methods§
fn round(self) -> Self
fn round(self) -> Self
Rounds to the nearest integer value.
This behavior is preserved for negative values (unlike the basic cast).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.