aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/MathTest.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-30 13:48:14 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-30 13:48:14 +0000
commitc20bc25b6e11fb068a9b4aefc1a2e576a98835ea (patch)
treeede1df831086be4c597344e359f48fb770feacbc /tests/MathTest.cpp
parentc3b697298e1185397c192457a4587b6ad0559c93 (diff)
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
Diffstat (limited to 'tests/MathTest.cpp')
-rw-r--r--tests/MathTest.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index e4596da8aa..11e47d7613 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -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) {