Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: include/core/SkFixed.h

Issue 1097473002: Correct SkFixedToDouble. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Correct the floating point value as well (fixes possible rounding issues). Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFixed.h
diff --git a/include/core/SkFixed.h b/include/core/SkFixed.h
index 8cf7a5679ce28358e994114204aba92162bc4332..c2a0a7a4fbf56a30fa5d6026fdb490ab804b5cff 100644
--- a/include/core/SkFixed.h
+++ b/include/core/SkFixed.h
@@ -28,7 +28,7 @@ typedef int32_t SkFixed;
#define SK_FixedTanPIOver8 (0x6A0A)
#define SK_FixedRoot2Over2 (0xB505)
-#define SkFixedToFloat(x) ((x) * 1.5258789e-5f)
+#define SkFixedToFloat(x) ((x) * 1.52587890625e-5f)
bungeman-skia 2015/04/16 20:41:31 Note that this diff might not cause any change, si
#if 1
#define SkFloatToFixed(x) ((SkFixed)((x) * SK_Fixed1))
#else
@@ -50,7 +50,7 @@ typedef int32_t SkFixed;
#define SkFloatToFixed_Check(x) SkFloatToFixed(x)
#endif
-#define SkFixedToDouble(x) ((x) * 1.5258789e-5)
+#define SkFixedToDouble(x) ((x) * 1.52587890625e-5)
bungeman-skia 2015/04/16 20:41:31 Note that no one is actually using this at the mom
#define SkDoubleToFixed(x) ((SkFixed)((x) * SK_Fixed1))
/** Converts an integer to a SkFixed, asserting that the result does not overflow
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698