view CustomMath/Comparisons.cs @ 10:3b7a321e7c4c

Fixes #4 - unexpected exception in translations * Call private language load method to avoid check and exception * Don't null the local table after we've set a default
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Jan 2009 12:02:36 +0000
parents 961030992bd2
children 0352fa33ee8f
line wrap: on
line source

using System;

namespace IBBoard.CustomMath
{
	/// <summary>
	/// Summary description for Comparisons.
	/// </summary>
	public class Comparisons
	{
		public static bool ValueWithinAmount(int baseline, int val, int delta)
		{
			int top = baseline + delta;
			int bottom = baseline - delta;

			return (val<=top && val>=bottom);
		}
	}
}