File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Points Lines Planes/Points Lines Planes/2D Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -14,27 +14,11 @@ struct Line2D: Equatable {
14
14
enum Slope : Equatable {
15
15
case finite( slope: Double )
16
16
case infinite( offset: Double )
17
-
18
- static func == ( lhs: Slope , rhs: Slope ) -> Bool {
19
- switch ( lhs, rhs) {
20
- case ( . finite( let slope1) , . finite( let slope2) ) : return slope1 == slope2
21
- case ( . infinite( let offset1) , . infinite( let offset2) ) : return offset1 == offset2
22
- default : return false
23
- }
24
- }
25
17
}
26
18
27
19
enum Direction : Equatable {
28
20
case increasing
29
21
case decreasing
30
-
31
- static func == ( lhs: Direction , rhs: Direction ) -> Bool {
32
- switch ( lhs, rhs) {
33
- case ( . increasing, . increasing) : return true
34
- case ( . decreasing, . decreasing) : return true
35
- default : return false
36
- }
37
- }
38
22
}
39
23
40
24
init ( from p1: Point2D , to p2: Point2D ) {
@@ -154,8 +138,4 @@ struct Line2D: Equatable {
154
138
return Line2D ( slope: . finite( slope: 0 ) , offset: p. y, direction: dir)
155
139
}
156
140
}
157
-
158
- static func == ( lhs: Line2D , rhs: Line2D ) -> Bool {
159
- return lhs. slope == rhs. slope && lhs. offset == rhs. offset && lhs. direction == rhs. direction
160
- }
161
141
}
You can’t perform that action at this time.
0 commit comments