comparison CustomMath/Comparisons.cs @ 0:961030992bd2

Initial commit of IBBoard libraries
author IBBoard <dev@ibboard.co.uk>
date Fri, 19 Dec 2008 11:13:48 +0000
parents
children 0352fa33ee8f
comparison
equal deleted inserted replaced
-1:000000000000 0:961030992bd2
1 using System;
2
3 namespace IBBoard.CustomMath
4 {
5 /// <summary>
6 /// Summary description for Comparisons.
7 /// </summary>
8 public class Comparisons
9 {
10 public static bool ValueWithinAmount(int baseline, int val, int delta)
11 {
12 int top = baseline + delta;
13 int bottom = baseline - delta;
14
15 return (val<=top && val>=bottom);
16 }
17 }
18 }