Virtu/Library/MathHelpers.cs
Sean Fausett fe9abb1c2b Added UseShiftKeyMod to GamePort settings.
Added signature to machine state.
Changed floating point precision from double to single.
2010-12-05 11:18:48 +13:00

16 lines
380 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);
}
}
}