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

Unified Diff: experimental/Intersection/IntersectionUtilities.h

Issue 867213004: remove prototype pathops code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « experimental/Intersection/Inline_Tests.cpp ('k') | experimental/Intersection/IntersectionUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/Intersection/IntersectionUtilities.h
diff --git a/experimental/Intersection/IntersectionUtilities.h b/experimental/Intersection/IntersectionUtilities.h
deleted file mode 100644
index b7e69fb65c45f38c2b3645fe026e30be1bb78619..0000000000000000000000000000000000000000
--- a/experimental/Intersection/IntersectionUtilities.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-// inline utilities
-/* Returns 0 if negative, 1 if zero, 2 if positive
-*/
-inline int side(double x) {
- return (x > 0) + (x >= 0);
-}
-
-/* Returns 1 if negative, 2 if zero, 4 if positive
-*/
-inline int sideBit(double x) {
- return 1 << side(x);
-}
-
-/* Given the set [0, 1, 2, 3], and two of the four members, compute an XOR mask
- that computes the other two. Note that:
-
- one ^ two == 3 for (0, 3), (1, 2)
- one ^ two < 3 for (0, 1), (0, 2), (1, 3), (2, 3)
- 3 - (one ^ two) is either 0, 1, or 2
- 1 >> 3 - (one ^ two) is either 0 or 1
-thus:
- returned == 2 for (0, 3), (1, 2)
- returned == 3 for (0, 1), (0, 2), (1, 3), (2, 3)
-given that:
- (0, 3) ^ 2 -> (2, 1) (1, 2) ^ 2 -> (3, 0)
- (0, 1) ^ 3 -> (3, 2) (0, 2) ^ 3 -> (3, 1) (1, 3) ^ 3 -> (2, 0) (2, 3) ^ 3 -> (1, 0)
-*/
-inline int other_two(int one, int two) {
- return 1 >> 3 - (one ^ two) ^ 3;
-}
-
-/* Returns -1 if negative, 0 if zero, 1 if positive
-*/
-inline int sign(double x) {
- return (x > 0) - (x < 0);
-}
-
-inline double interp(double A, double B, double t) {
- return A + (B - A) * t;
-}
« no previous file with comments | « experimental/Intersection/Inline_Tests.cpp ('k') | experimental/Intersection/IntersectionUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698