closeTo method

bool closeTo(
  1. num other,
  2. num epsilon
)

Tests if this object is close to another object.

Implementation

bool closeTo(num other, num epsilon) =>
    isFinite && other.isFinite && (this - other).abs() <= epsilon;