aboutEquals method

bool aboutEquals(
  1. double moduleSize,
  2. double i,
  3. double j
)

Determines if this finder pattern "about equals" a finder pattern at the stated position and size -- meaning, it is at nearly the same center with nearly the same size.

Implementation

bool aboutEquals(double moduleSize, double i, double j) {
  if ((i - y).abs() <= moduleSize && (j - x).abs() <= moduleSize) {
    final moduleSizeDiff = (moduleSize - _estimatedModuleSize).abs();
    return moduleSizeDiff <= 1.0 || moduleSizeDiff <= _estimatedModuleSize;
  }
  return false;
}