Whether two doubles are within a given distance of each other.
The epsilon argument must be positive.
bool nearEqual(double a, double b, double epsilon) { assert(epsilon >= 0.0); return (a > (b - epsilon)) && (a < (b + epsilon)); }