pub trait ConstMidpoint: Sized {
// Required method
fn midpoint(self, rhs: Self) -> Self;
}Expand description
Const-compatible midpoint calculation.
Computes the average of two values, rounded down, without overflow. Stable since Rust 1.85.0.
Required Methods§
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.