add sk_float_isfinite to mask platform differences

git-svn-id: http://skia.googlecode.com/svn/trunk@2803 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-12-05 21:47:25 +00:00
parent d230e3e532
commit 61873a59d7
2 changed files with 8 additions and 2 deletions

View File

@ -58,7 +58,7 @@ static inline float sk_float_copysign(float x, float y) {
#define sk_float_acos(x) acosf(x)
#define sk_float_asin(x) asinf(x)
#endif
#define sk_float_atan2(y,x) atan2f(y,x)
#define sk_float_atan2(y,x) atan2f(y,x)
#define sk_float_abs(x) fabsf(x)
#define sk_float_mod(x,y) fmodf(x,y)
#define sk_float_exp(x) expf(x)
@ -66,6 +66,12 @@ static inline float sk_float_copysign(float x, float y) {
#define sk_float_isNaN(x) _isnan(x)
#endif
#ifdef SK_BUILD_FOR_WIN
#define sk_float_isfinite(x) _finite(x)
#else
#define sk_float_isfinite(x) isfinite(x)
#endif
#ifdef SK_USE_FLOATBITS
#define sk_float_floor2int(x) SkFloatToIntFloor(x)
#define sk_float_round2int(x) SkFloatToIntRound(x)

View File

@ -20,7 +20,7 @@ static bool isFinite_int(float x) {
}
static bool isFinite_float(float x) {
return isfinite(x);
return sk_float_isfinite(x);
}
static bool isFinite_mulzero(float x) {