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:
@@ -42,6 +42,30 @@ wxFloat64 wxConvertFromIeeeExtended(const wxInt8 *bytes);
|
||||
*/
|
||||
void wxConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes);
|
||||
|
||||
/**
|
||||
Convert degrees to radians.
|
||||
|
||||
This function simply returns its argument multiplied by @c M_PI/180 but is
|
||||
more readable than writing this expression directly.
|
||||
|
||||
@see wxRadToDeg()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
double wxDegToRad(double deg);
|
||||
|
||||
/**
|
||||
Convert radians to degrees.
|
||||
|
||||
This function simply returns its argument multiplied by @c 180/M_PI but is
|
||||
more readable than writing this expression directly.
|
||||
|
||||
@see wxDegToRad()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
double wxRadToDeg(double rad);
|
||||
|
||||
/**
|
||||
Small wrapper around round().
|
||||
*/
|
||||
|
Reference in New Issue
Block a user