lukasvrenner / crossyword

A crossword puzzle written in Rust
https://lukasvrenner.github.io/crossyword/
Apache License 2.0
3 stars 1 forks source link

total_overlaps does not need to divide by two #10

Closed lukasvrenner closed 8 months ago

lukasvrenner commented 8 months ago

The overlap calculator calculates twice the number of overlaps, and then divides it by two. The division is unnecessary, because if a > b then 2a > 2b.