| @@ -28,6 +28,7 @@ THE SOFTWARE. | |||||
| #ifndef NANOVG_H | #ifndef NANOVG_H | ||||
| #error "nanovg.h must be included first." | #error "nanovg.h must be included first." | ||||
| #endif | #endif | ||||
| #include "compat.h" | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| @@ -0,0 +1,24 @@ | |||||
| #ifdef _MSC_VER | |||||
| static float fminf ( float a, float b ) | |||||
| { | |||||
| return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b)); | |||||
| } | |||||
| static float fmaxf ( float a, float b ) | |||||
| { | |||||
| return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b)); | |||||
| } | |||||
| static double fmin ( double a, double b ) | |||||
| { | |||||
| return _isnan(a) ? b : ( _isnan(b) ? a : ((a < b) ? a : b)); | |||||
| } | |||||
| static double fmax ( double a, double b ) | |||||
| { | |||||
| return _isnan(a) ? b : ( _isnan(b) ? a : ((a > b) ? a : b)); | |||||
| } | |||||
| #endif | |||||