From 760ab259fa9354e34c588c2449113f46ba3bdce0 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 23 Apr 2020 10:19:45 -0400 Subject: [PATCH] feat: Adding MathUtils.Clamp overload for bytes --- ICD.Common.Utils/MathUtils.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ICD.Common.Utils/MathUtils.cs b/ICD.Common.Utils/MathUtils.cs index ea48b0e..23844d5 100644 --- a/ICD.Common.Utils/MathUtils.cs +++ b/ICD.Common.Utils/MathUtils.cs @@ -10,6 +10,18 @@ namespace ICD.Common.Utils /// public static class MathUtils { + /// + /// Clamps the number between the two values. + /// + /// + /// + /// + /// + public static byte Clamp(byte number, byte min, byte max) + { + return (byte)Clamp((double)number, min, max); + } + /// /// Clamps the number between the two values. ///