mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
feat: Adding MathUtils.Clamp overload for bytes
This commit is contained in:
parent
40e00e0ab7
commit
760ab259fa
1 changed files with 12 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue