Update median calculation
ClosedPublic

Authored by murveit on Mar 6 2020, 8:27 AM.

Details

Summary

Simplifies the median calculation, and defends against edge cases that can cause crashes.

Test Plan

Should compute the same results as the previous median, and should not crash.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Mar 6 2020, 8:27 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptMar 6 2020, 8:27 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Mar 6 2020, 8:27 AM
mutlaqja accepted this revision.Mar 6 2020, 8:29 AM
This revision is now accepted and ready to land.Mar 6 2020, 8:29 AM
This revision was automatically updated to reflect the committed changes.