(self, obj)
| 100 | return obj.x0 <= self.x1 and self.x0 <= obj.x1 |
| 101 | |
| 102 | def hdistance(self, obj): |
| 103 | assert isinstance(obj, LTComponent) |
| 104 | if self.is_hoverlap(obj): |
| 105 | return 0 |
| 106 | else: |
| 107 | return min(abs(self.x0-obj.x1), abs(self.x1-obj.x0)) |
| 108 | |
| 109 | def hoverlap(self, obj): |
| 110 | assert isinstance(obj, LTComponent) |
no test coverage detected