function closeEnough(actualValue, expectedValue, tolerancePercent) {
        var toReturn;
        var toleranceFraction = expectedValue * (tolerancePercent/100);
        var minExpected = expectedValue - toleranceFraction;
        var maxExpected = expectedValue + toleranceFraction;

        if (actualValue >= minExpected && actualValue <= maxExpected) {
            toReturn = true;
        } else {
            toReturn = false;
        }
        return toReturn;
    }
Tells whether two numeric values are close enough to each other
@param actualValue - the value we're testing
@param expectedValue - the value we're matching the test value against
@param tolerancePercent - the percentage of tolerated deviation (0 means equals)