Since QtMath library has a proper M_PI the define is not necessary anymore. Furthermore, C++'s round() function behaves in similar fashion to the ROUND2INT macro (rounding away
from zero). If this style of rounding is not specifically required, I suggest another revision to change it to rint(), which rounds towards even numbers.
Details
Details
Diff Detail
Diff Detail
- Repository
- R337 KTurtle
- Branch
- Math
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 4614 Build 4632: arc lint + arc unit
Comment Actions
Since this is new code I think you should use the new style casts for these new casts.
src/directiondialog.cpp | ||
---|---|---|
375 ↗ | (On Diff #44318) | this style of casting will give us a lot of warnings when compilling with clang. |
src/directiondialog.cpp | ||
---|---|---|
375 ↗ | (On Diff #44318) | Simply using the new cast style will remove the warning(s). double x ; int z = (int)x; // old style cast warning int y = int(x); // no cast warning |