- | Some (overlapArea, _, _) ->
- let matchingScore = (2.f * overlapArea / (areaE + areaOther)) ** 30.f
- if matchingScore <= 1.f // For approximation error.
- then
+ | Some (overlapArea, _, _)
+ // Because of approximation error, see https://github.com/chraibi/EEOver/issues/4
+ when overlapArea - areaE < 1.f && overlapArea - areaOther < 1.f ->
+ let matchingScore = (2.f * overlapArea / (areaE + areaOther)) ** matchingScorePower