We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4313e7e commit 944d7ebCopy full SHA for 944d7eb
contents/jarvis_march/code/c++/jarvis_march.cpp
@@ -50,15 +50,21 @@ std::vector<Point> jarvis_march(const std::vector<Point>& points)
50
51
int main() {
52
std::vector<Point> points = {
53
- { 1.0, 3.0 },
54
55
- { 2.0, 4.0 },
56
- { 4.0, 0.0 },
57
- { 1.0, 0.0 },
58
- { 0.0, 2.0 },
59
- { 2.0, 2.0 },
60
- { 3.0, 4.0 },
61
- { 3.0, 1.0 },
+ { -5.0, 2.0 },
+ { 5.0, 7.0 },
+ { -6.0, -12.0 },
+ { -14.0, -14.0 },
+ { 9.0, 9.0 },
+ { -1.0, -1.0 },
+ { -10.0, 11.0 },
+ { -6.0, 15.0 },
+ { -6.0, -8.0 },
62
+ { 15.0, -9.0 },
63
+ { 7.0, -7.0 },
64
+ { -2.0, -9.0 },
65
+ { 6.0, -5.0 },
66
+ { 0.0, 14.0 },
67
+ { 2.0, 8.0 }
68
};
69
70
auto hull_points = jarvis_march(points);
@@ -69,4 +75,3 @@ int main() {
75
std::cout << '(' << point.x << ", " << point.y << ')' << std::endl;
76
}
71
77
72
-
0 commit comments