Skip to content

Commit e823152

Browse files
Change points to match other implementations
1 parent f8b773d commit e823152

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

contents/graham_scan/code/rust/graham_scan.rs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,21 @@ fn graham_scan(mut points: Vec<Point>) -> Vec<Point> {
7575

7676
fn main() {
7777
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 },
78+
Point { x: -5.0, y: 2.0 },
79+
Point { x: 5.0, y: 7.0 },
80+
Point { x: -6.0, y: -12.0 },
81+
Point { x: -14.0, y: -14.0 },
82+
Point { x: 9.0, y: 9.0 },
83+
Point { x: -1.0, y: -1.0 },
84+
Point { x: -10.0, y: -11.0 },
85+
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 },
8693
];
8794

8895
let hull_points = graham_scan(points);

0 commit comments

Comments
 (0)