Trait 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
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.