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 f8b773d commit e823152Copy full SHA for e823152
contents/graham_scan/code/rust/graham_scan.rs
@@ -75,14 +75,21 @@ fn graham_scan(mut points: Vec<Point>) -> Vec<Point> {
75
76
fn main() {
77
let points = vec![
78
- Point { x: 1.0, y: 3.0 },
79
- Point { x: 2.0, y: 4.0 },
80
- Point { x: 4.0, y: 0.0 },
81
- Point { x: 1.0, y: 0.0 },
82
- Point { x: 0.0, y: 2.0 },
83
- Point { x: 2.0, y: 2.0 },
84
- Point { x: 3.0, y: 4.0 },
85
- Point { x: 3.0, y: 1.0 },
+ Point { x: -5.0, y: 2.0 },
+ Point { x: 5.0, y: 7.0 },
+ Point { x: -6.0, y: -12.0 },
+ Point { x: -14.0, y: -14.0 },
+ Point { x: 9.0, y: 9.0 },
+ Point { x: -1.0, y: -1.0 },
+ Point { x: -10.0, y: -11.0 },
+ Point { x: -6.0, y: 15.0 },
86
+ Point { x: -6.0, y: 8.0 },
87
+ Point { x: 15.0, y: -9.0 },
88
+ Point { x: -7.0, y: -7.0 },
89
+ Point { x: -2.0, y: -9.0 },
90
+ Point { x: 6.0, y: -5.0 },
91
+ Point { x: 0.0, y: 14.0 },
92
+ Point { x: 2.0, y: 8.0 },
93
];
94
95
let hull_points = graham_scan(points);
0 commit comments