mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: Adding MathUtils.Clamp overload for bytes
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user