From 182e08a0919de488c635c6a7ec15024a85bc9d8d Mon Sep 17 00:00:00 2001 From: Jacob Kiesel Date: Tue, 7 Feb 2017 10:49:28 -0700 Subject: [PATCH] Add inline attribute --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) 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}