namespace FishNet.Utility.Extension
{
public static class MathFN
{
///
/// Returns a clamped SBytte.
///
public static sbyte ClampSByte(long value, sbyte min, sbyte max)
{
if (value < min)
return min;
else if (value > max)
return max;
else
return (sbyte)value;
}
///
/// Returns a clamped double.
///
public static double ClampDouble(double value, double min, double max)
{
if (value < min)
return min;
else if (value > max)
return max;
else
return value;
}
}
}