Add a wxRound() overload for int

To avoid breaking any dumb code.
And add a long double overload as well, because pigs might fly.
This commit is contained in:
Paul Cornett 2020-11-05 09:06:12 -08:00
parent 8d4b6ac8b8
commit c2e5f3520a

View File

@ -162,6 +162,11 @@ inline int wxRound(float x)
#endif #endif
} }
inline int wxRound(long double x) { return wxRound(double(x)); }
wxDEPRECATED_MSG("rounding an integer is useless")
inline int wxRound(int x) { return x; }
// Convert between degrees and radians. // Convert between degrees and radians.
inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; } inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; }
inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; } inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; }