Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(20)

Unified Diff: experimental/Intersection/ConvexHull_Test.cpp

Issue 6474054: Result of running tools/sanitize_source_files.py (II) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: experimental/Intersection/ConvexHull_Test.cpp
===================================================================
--- experimental/Intersection/ConvexHull_Test.cpp (revision 5253)
+++ experimental/Intersection/ConvexHull_Test.cpp (working copy)
@@ -46,17 +46,17 @@
{{1, 0}, {2, 0}, {0, 1}, {0, 0}},
{{2, 0}, {0, 1}, {0, 0}, {1, 0}},
{{0, 1}, {0, 0}, {1, 0}, {2, 0}},
-
+
{{0, 0}, {0, 1}, {0, 2}, {1, 1}}, // extra point on vert
{{0, 1}, {0, 2}, {1, 1}, {0, 0}},
{{0, 2}, {1, 1}, {0, 0}, {0, 1}},
{{1, 1}, {0, 0}, {0, 1}, {0, 2}},
-
+
{{0, 0}, {1, 1}, {2, 2}, {2, 0}}, // extra point on diag
{{1, 1}, {2, 2}, {2, 0}, {0, 0}},
{{2, 2}, {2, 0}, {0, 0}, {1, 1}},
{{2, 0}, {0, 0}, {1, 1}, {2, 2}},
-
+
{{0, 0}, {2, 0}, {2, 2}, {1, 1}}, // extra point on diag
{{2, 0}, {2, 2}, {1, 1}, {0, 0}},
{{2, 2}, {1, 1}, {0, 0}, {2, 0}},
@@ -99,9 +99,9 @@
static void transform(const Cubic& cubic, const Matrix3x2& matrix, Cubic& rotPath) {
for (int index = 0; index < 4; ++index) {
- rotPath[index].x = cubic[index].x * matrix[0][0]
+ rotPath[index].x = cubic[index].x * matrix[0][0]
+ cubic[index].y * matrix[1][0] + matrix[2][0];
- rotPath[index].y = cubic[index].x * matrix[0][1]
+ rotPath[index].y = cubic[index].x * matrix[0][1]
+ cubic[index].y * matrix[1][1] + matrix[2][1];
}
}
@@ -146,7 +146,7 @@
for (int index = 0; index < 4; ++index) {
if (debug_rotate_to_hull) printf("(%g,%g) ", rotPath[index].x, rotPath[index].y);
sides[side(rotPath[index].y - rotPath[inner].y)]++;
- if (index != outer && index != inner
+ if (index != outer && index != inner
&& side(rotPath[index].y - rotPath[inner].y) == 1)
zeroes = index;
}
@@ -169,13 +169,13 @@
__FUNCTION__, (int)idx, (int)inr, (int)outer, (int)inner);
continue;
}
- if (rotPath[zeroes].x < rotPath[inner].x
+ if (rotPath[zeroes].x < rotPath[inner].x
&& rotPath[zeroes].x < rotPath[outer].x) {
if (debug_rotate_to_hull) printf("%s [%d,%d] [o=%d,i=%d] zeroes < inner && outer\n",
__FUNCTION__, (int)idx, (int)inr, (int)outer, (int)inner);
continue;
}
- if (rotPath[zeroes].x > rotPath[inner].x
+ if (rotPath[zeroes].x > rotPath[inner].x
&& rotPath[zeroes].x > rotPath[outer].x) {
if (debug_rotate_to_hull) printf("%s [%d,%d] [o=%d,i=%d] zeroes > inner && outer\n",
__FUNCTION__, (int)idx, (int)inr, (int)outer, (int)inner);
@@ -242,7 +242,7 @@
for (pt = 0; pt < cmp; ++pt) {
if (pts & 1 << order[pt]) {
printf("%s [%d,%d] duplicate index in order: %d,%d,%d",
- __FUNCTION__, (int)index, (int)inner,
+ __FUNCTION__, (int)index, (int)inner,
order[0], order[1], order[2]);
if (cmp == 4) {
printf(",%d", order[3]);
@@ -252,7 +252,7 @@
}
if (cmpPts & 1 << cmpOrder[pt]) {
printf("%s [%d,%d] duplicate index in order: %d,%d,%d",
- __FUNCTION__, (int)index, (int)inner,
+ __FUNCTION__, (int)index, (int)inner,
cmpOrder[0], cmpOrder[1], cmpOrder[2]);
if (cmp == 4) {
printf(",%d", cmpOrder[3]);
@@ -291,7 +291,7 @@
}
if (pts != cmpPts) {
printf("%s [%d,%d] mismatch indices: order=%d,%d,%d",
- __FUNCTION__, (int)index, (int)inner,
+ __FUNCTION__, (int)index, (int)inner,
order[0], order[1], order[2]);
if (cmp == 4) {
printf(",%d", order[3]);
@@ -311,7 +311,7 @@
if (cmpOrder[match ^ 2] != order[2]) {
printf("%s [%d,%d] bowtie mismatch: order=%d,%d,%d,%d"
" cmpOrder=%d,%d,%d,%d\n",
- __FUNCTION__, (int)index, (int)inner,
+ __FUNCTION__, (int)index, (int)inner,
order[0], order[1], order[2], order[3],
cmpOrder[0], cmpOrder[1], cmpOrder[2], cmpOrder[3]);
}
@@ -383,10 +383,10 @@
}
for (idx = 0; idx < cmp; ++idx) {
if (cmpOrder[idx] == 0) {
- rOrder[0] = cmpOrder[(idx + 1) % cmp];
+ rOrder[0] = cmpOrder[(idx + 1) % cmp];
rOrder[1] = cmpOrder[(idx + cmp - 1) % cmp];
} else if (cmpOrder[idx] == 3) {
- rOrder[2] = cmpOrder[(idx + 1) % cmp];
+ rOrder[2] = cmpOrder[(idx + 1) % cmp];
rOrder[3] = cmpOrder[(idx + cmp - 1) % cmp];
}
}
Property changes on: experimental/Intersection/ConvexHull_Test.cpp
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b