X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b21126db7a8232fa9e64b29f916d73d6b0153bef..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/math.h?ds=sidebyside diff --git a/interface/wx/math.h b/interface/wx/math.h index 6047703863..1431f452ea 100644 --- a/interface/wx/math.h +++ b/interface/wx/math.h @@ -2,8 +2,7 @@ // Name: math.h // Purpose: interface of global functions // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @addtogroup group_funcmacro_math */ @@ -24,5 +23,42 @@ int wxFinite(double x); */ bool wxIsNaN(double x); +/** + Converts the given array of 10 bytes (corresponding to 80 bits) to + a float number according to the IEEE floating point standard format + (aka IEEE standard 754). + + @see wxConvertToIeeeExtended() to perform the opposite operation +*/ +wxFloat64 wxConvertFromIeeeExtended(const wxInt8 *bytes); + +/** + Converts the given floating number @a num in a sequence of 10 bytes + which are stored in the given array @a bytes (which must be large enough) + according to the IEEE floating point standard format + (aka IEEE standard 754). + + @see wxConvertFromIeeeExtended() to perform the opposite operation +*/ +void wxConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes); + +/** + Small wrapper around round(). +*/ +int wxRound(double x); + +/** + Returns true if both double values are identical. This is + only reliable if both values have been assigned the same + value. +*/ +bool wxIsSameDouble(double x, double y); + +/** + Return true of @a x is exactly zero. This is only reliable + if it has been assigned 0. +*/ +bool wxIsNullDouble(double x); + //@}