Source

SharpHammer / SharpHammer / MathUtil.cs

namespace SharpHammer
{
	public class MathUtil
	{
		public static float Clamp(float value, float min, float max)
		{
			if (value < min)
				return min;
			if (value > max)
				return max;
			return value;
		}
	}
}