CCCoreLib
CCCoreLib copied to clipboard
Replace CC_RAD_TO_DEG/CC_DEG_TO_RAD with inline methods
Describe the feature you would like
Replacing these constants with inlines would make code more readable and help eliminate casting and compiler warnings.
CCLib::CC_RAD_TO_DEG*phi
becomes
CCLib::radiansToDegrees( phi )
(Move strategy here from comment below.)
Because this touches a lot of math, I'm going to do this in multiple steps so it can be reviewed more easily.
- [x] Add CCMath.h, mark
RAD_TO_DEGas deprecated, and commit CCCoreLib - [x] Change all occurrences in CloudCompare and wait for code review
- [x] Mark
DEG_TO_RADas deprecated and commit CCCoreLib - [x] Change all occurrences in CloudCompare and wait for code review
- [x] Mark
ZERO_TOLERANCEas deprecated and commit CCCoreLib - [x] Change all occurrences in CloudCompare and wait for code review
- [ ] Once everything is converted, remove
RAD_TO_DEG,DEG_TO_RAD, andZERO_TOLERANCE
Why not
So the next question is where do these new methods (and the ZERO_TOLERANCE ones) live? They are no longer constants.
Maybe a new CCMath.h?
Yes why not!