equal method

bool equal(
  1. num other,
  2. double tolerance
)

Implementation

bool equal(num other, double tolerance) {
  return (this - other).abs() < tolerance;
}