mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-06-11 10:29:31 +00:00
27a5e3ac89
Normalize text files.
16 lines
365 B
C#
16 lines
365 B
C#
namespace Jellyfish.Library
|
|
{
|
|
public static class MathHelpers
|
|
{
|
|
public static int Clamp(int value, int min, int max)
|
|
{
|
|
return (value < min) ? min : (value > max) ? max : value;
|
|
}
|
|
|
|
public static int ClampByte(int value)
|
|
{
|
|
return Clamp(value, byte.MinValue, byte.MaxValue);
|
|
}
|
|
}
|
|
}
|