(b *SweepPoint)
| 1009 | } |
| 1010 | |
| 1011 | func (a *SweepPoint) CompareH(b *SweepPoint) int { |
| 1012 | // used for nodes in tolerance square so that a.X==b.X and a.Y==b.Y |
| 1013 | // sort left-to-right, then bottom-to-top, then right-endpoints before left-endpoints, and then |
| 1014 | // sort upwards to ensure a CCW orientation of the result |
| 1015 | //if a.X < b.X { |
| 1016 | // return -1 |
| 1017 | //} else if b.X < a.X { |
| 1018 | // return 1 |
| 1019 | //} else if a.Y < b.Y { |
| 1020 | // return -1 |
| 1021 | //} else if b.Y < a.Y { |
| 1022 | // return 1 |
| 1023 | if !a.left && b.left { |
| 1024 | return -1 |
| 1025 | } else if a.left && !b.left { |
| 1026 | return 1 |
| 1027 | } |
| 1028 | return a.compareTangentsV(b) |
| 1029 | } |
| 1030 | |
| 1031 | func (a *SweepPoint) compareOverlapsV(b *SweepPoint) int { |
| 1032 | // compare segments vertically that overlap (ie. are the same) |
nothing calls this directly
no test coverage detected