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
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Since this is new code I think you should use the new style casts for these new casts.
src/directiondialog.cpp | ||
---|---|---|
375 | this style of casting will give us a lot of warnings when compilling with clang. |
src/directiondialog.cpp | ||
---|---|---|
375 | 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 |