isCloseTo method

bool isCloseTo(
  1. num other, {
  2. num delta = 0.1,
})

Checks if this number is close to other within a delta.

Implementation

bool isCloseTo(num other, {num delta = 0.1}) {
  return (this - other).abs() < delta;
}