Deleted the macros defining ROUND2INT and used qRound() instead. There's one instance where C++'s round() is used instead, since the original line is (double)ROUND2INT. Macros
defining operations with degrees were changed accordingly
Details
Details
- Reviewers
tcanabrava rizzitello
Diff Detail
Diff Detail
- Repository
- R337 KTurtle
- Branch
- Math
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4219 Build 4237: arc lint + arc unit
src/directiondialog.cpp | ||
---|---|---|
375 | Are you sure about this? qRound(-0.5) returns 0 |
Comment Actions
Have you tried to run any tests to see how the output would change when using round vs qRound?
It seams that round would act the same as ROUND2INT as both round down (qRound rounds up).
src/directiondialog.cpp | ||
---|---|---|
375 | This method is only called when the degree is between 0 or 360. From what I've seem, the round macro is only used for positive numbers, though it seems to me that this macro is more likely an error than an intended deviation from regular math |