diff --git a/src/lib.rs b/src/lib.rs index 0a2cdee..9e92a91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,6 +114,7 @@ pub mod rational { /// /// If input is less than min then min is returned, if input is greater than max then max is /// returned. Otherwise input is returned. +#[inline] pub fn clamp(input: T, min: T, max: T) -> T { debug_assert!(min < max, "min must be less than max"); if input <= min {min}