Browse Source

blendish compat.h

(copy from liminal/speedups/defs/compat.h
pull/1/head
learn_more 10 years ago
parent
commit
b6f05f0398
2 changed files with 25 additions and 0 deletions
  1. +1
    -0
      blendish.h
  2. +24
    -0
      compat.h

+ 1
- 0
blendish.h View File

@@ -28,6 +28,7 @@ THE SOFTWARE.
#ifndef NANOVG_H
#error "nanovg.h must be included first."
#endif
#include "compat.h"

#ifdef __cplusplus
extern "C" {


+ 24
- 0
compat.h View File

@@ -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


Loading…
Cancel
Save