Make clamp inline

This commit is contained in:
blyxyas 2024-05-23 18:45:03 +02:00
parent bec10295d4
commit d6e6918857

View File

@ -898,6 +898,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
/// assert_eq!(2.clamp(-2, 1), 1); /// assert_eq!(2.clamp(-2, 1), 1);
/// ``` /// ```
#[must_use] #[must_use]
#[inline]
#[stable(feature = "clamp", since = "1.50.0")] #[stable(feature = "clamp", since = "1.50.0")]
fn clamp(self, min: Self, max: Self) -> Self fn clamp(self, min: Self, max: Self) -> Self
where where