Index: Common.h =================================================================== diff -u -r404f66cb61ba4bd71ea5af97c9b3e6eef9fa6743 -r6a00bc5632cfdb84cf72e7dbbc55ff115e3481d5 --- Common.h (.../Common.h) (revision 404f66cb61ba4bd71ea5af97c9b3e6eef9fa6743) +++ Common.h (.../Common.h) (revision 6a00bc5632cfdb84cf72e7dbbc55ff115e3481d5) @@ -104,6 +104,7 @@ #define SEC_PER_MIN 60 ///< # of seconds in a minute. #define FRACTION_TO_PERCENT_FACTOR 100.0 ///< Percentage factor (100). #define MIN_PER_HOUR 60 ///< # of minutes in an hour. +#define PI 3.1415927 ///< PI. // **** Common Macros **** @@ -125,6 +126,7 @@ #define MAKE_LONG_OF_WORDS(h, l) ((((U32)(h) << SHIFT_16_BITS_FOR_WORD_SHIFT) & MASK_OFF_LSW) | ((U32)(l) & MASK_OFF_MSW)) ///< Macro merges two 2-byte words into a 4-byte word. #define GET_TOGGLE(v, l, h) ((v) == (l) ? (h) : (l)) ///< Macro toggles a value. #define BIT_BY_POS(p) (1U << (p)) ///< Macro returns a bit mask for a bit of given position. +#define RAD2DEG(r) ((r) * 180.0 / PI) ///< Macro converts radians to degrees /**@}*/