closeTo method

  1. @override
bool closeTo(
  1. Fraction other,
  2. num epsilon
)
override

Tests if this object is close to another object.

Implementation

@override
bool closeTo(Fraction other, num epsilon) =>
    isFinite &&
    other.isFinite &&
    (toDouble() - other.toDouble()).abs() <= epsilon;