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

Side by Side Diff: src/pathops/SkPathOpsTypes.h

Issue 266063003: cubicline intersection binary search (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typing cleanup Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsDebug.h ('k') | src/pathops/SkPathOpsTypes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkPathOpsTypes_DEFINED 7 #ifndef SkPathOpsTypes_DEFINED
8 #define SkPathOpsTypes_DEFINED 8 #define SkPathOpsTypes_DEFINED
9 9
10 #include <float.h> // for FLT_EPSILON 10 #include <float.h> // for FLT_EPSILON
(...skipping 12 matching lines...) Expand all
23 }; 23 };
24 24
25 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. 25 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values.
26 bool AlmostEqualUlps(float a, float b); 26 bool AlmostEqualUlps(float a, float b);
27 inline bool AlmostEqualUlps(double a, double b) { 27 inline bool AlmostEqualUlps(double a, double b) {
28 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b)); 28 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
29 } 29 }
30 30
31 // Use Almost Dequal when comparing should not special case denormalized values. 31 // Use Almost Dequal when comparing should not special case denormalized values.
32 bool AlmostDequalUlps(float a, float b); 32 bool AlmostDequalUlps(float a, float b);
33 inline bool AlmostDequalUlps(double a, double b) { 33 bool AlmostDequalUlps(double a, double b);
34 return AlmostDequalUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
35 }
36 34
37 bool NotAlmostEqualUlps(float a, float b); 35 bool NotAlmostEqualUlps(float a, float b);
38 inline bool NotAlmostEqualUlps(double a, double b) { 36 inline bool NotAlmostEqualUlps(double a, double b) {
39 return NotAlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b)); 37 return NotAlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
40 } 38 }
41 39
42 bool NotAlmostDequalUlps(float a, float b); 40 bool NotAlmostDequalUlps(float a, float b);
43 inline bool NotAlmostDequalUlps(double a, double b) { 41 inline bool NotAlmostDequalUlps(double a, double b) {
44 return NotAlmostDequalUlps(SkDoubleToScalar(a), SkDoubleToScalar(b)); 42 return NotAlmostDequalUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
45 } 43 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 */ 362 */
365 inline int SkDSideBit(double x) { 363 inline int SkDSideBit(double x) {
366 return 1 << SKDSide(x); 364 return 1 << SKDSide(x);
367 } 365 }
368 366
369 inline double SkPinT(double t) { 367 inline double SkPinT(double t) {
370 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t; 368 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t;
371 } 369 }
372 370
373 #endif 371 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsDebug.h ('k') | src/pathops/SkPathOpsTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698