Add public wxDegToRad() and wxRadToDeg() functions.
Define these functions just once in wx/math.h instead of duplicating them in a dozen of places. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -133,6 +133,10 @@ inline int wxRound(double x)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Convert between degrees and radians.
|
||||
inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; }
|
||||
inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; }
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user