I have two decimals:
var first = 1.567m;
var second = 1.568m;
var areEqual = first == second; // false
And I have an acceptable margin of error; which is 0.010.
So what I need is a Check method:
Check(first: 1.567m, second: 1.577m, margin: 0.010m); // true
Check(first: 1.567m, second: 1.578m, margin: 0.010m); // false
Check(first: 1.567m, second: 1.578m, margin: 0.011m); // true
How can I write that?
1 Answer