featureDistSquared function

double featureDistSquared(
  1. Feature f1,
  2. Feature f2
)

Implementation

double featureDistSquared(Feature f1, Feature f2) {
  if (f1 is CornerFeature && f2 is CornerFeature && f1.convex != f2.convex) {
    return double.maxFinite;
  }

  return (featureRepresentativePoint(f1) - featureRepresentativePoint(f2))
      .getDistanceSquared();
}