Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix sorting algorithm - crashed the debug versions (#26)
- Fixed: 2 equal values could return true (sorting algorithms require that 2 equal values return false). This caused a assertion error in debug builds and thus a crash. - Fixed: testing equality of floats with zero. - Simplified a test: knowing that dl > 0 and dr > 0, (cl * cr < 0) ? (cl > cr) : (dl * cr < dr * cl) is equivalent to: (dl * cr < dr * cl)
- Loading branch information