mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-10 09:20:23 +01:00
Add an implementation of fmax for use with MSVC
This commit is contained in:
parent
aca492eb3f
commit
de2c5bfa19
1 changed files with 14 additions and 0 deletions
|
|
@ -227,6 +227,20 @@ ffs (int x)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include <float.h>
|
||||
|
||||
static inline double
|
||||
fmax (double a, double b)
|
||||
{
|
||||
if (_isnan(a))
|
||||
return b;
|
||||
if (_isnan(b))
|
||||
return a;
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue