No built-in method exists to check approximate equality. Current workaround:
a.minus(b).abs().lte(delta)
Proposed:
Decimal(1.00000001).closeTo(Decimal(1), 0.00000001) // true
Feel free to change the function name, the point is to simplify approximation assertions :)
No built-in method exists to check approximate equality. Current workaround:
Proposed:
Feel free to change the function name, the point is to simplify approximation assertions :)