2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2008-03-08 14:43:31 +00:00
|
|
|
// Name: math.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of global functions
|
2008-03-08 14:43:31 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-01-05 20:48:06 +00:00
|
|
|
/** @addtogroup group_funcmacro_math */
|
2008-03-23 18:24:32 +00:00
|
|
|
//@{
|
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
/**
|
2008-03-23 18:24:32 +00:00
|
|
|
Returns a non-zero value if @a x is neither infinite nor NaN (not a
|
|
|
|
number), returns 0 otherwise.
|
|
|
|
|
|
|
|
@header{wx/math.h}
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
int wxFinite(double x);
|
|
|
|
|
2008-03-23 18:24:32 +00:00
|
|
|
/**
|
|
|
|
Returns a non-zero value if x is NaN (not a number), returns 0 otherwise.
|
|
|
|
|
|
|
|
@header{wx/math.h}
|
|
|
|
*/
|
|
|
|
bool wxIsNaN(double x);
|
|
|
|
|
2009-01-07 17:56:52 +00:00
|
|
|
/**
|
|
|
|
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);
|
|
|
|
|
2009-01-12 10:58:26 +00:00
|
|
|
/**
|
|
|
|
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);
|
|
|
|
|
2008-03-23 18:24:32 +00:00
|
|
|
//@}
|
2008-03-08 13:52:38 +00:00
|
|
|
|