feat: Adding MathUtils.Clamp overload for bytes

This commit is contained in:
Chris Cameron
2020-04-23 10:19:45 -04:00
parent 40e00e0ab7
commit 760ab259fa

View File

@@ -10,6 +10,18 @@ namespace ICD.Common.Utils
/// </summary>
public static class MathUtils
{
/// <summary>
/// Clamps the number between the two values.
/// </summary>
/// <param name="number"></param>
/// <param name="min"></param>
/// <param name="max"></param>
/// <returns></returns>
public static byte Clamp(byte number, byte min, byte max)
{
return (byte)Clamp((double)number, min, max);
}
/// <summary>
/// Clamps the number between the two values.
/// </summary>