use (float)(1 << 23) instead of 1.0p+23 since the latter isn't supported in VS

git-svn-id: http://skia.googlecode.com/svn/trunk@4068 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-05-30 13:48:14 +00:00
parent c3b697298e
commit c20bc25b6e

View File

@ -17,12 +17,9 @@ static float sk_fsel(float pred, float result_ge, float result_lt) {
}
static float fast_floor(float x) {
#ifdef SK_BUILD_FOR_WIN
return sk_float_floor(x);
#else
float big = sk_fsel(x, 0x1.0p+23, -0x1.0p+23);
// float big = sk_fsel(x, 0x1.0p+23, -0x1.0p+23);
float big = sk_fsel(x, (float)(1 << 23), -(float)(1 << 23));
return (x + big) - big;
#endif
}
static float std_floor(float x) {