(self, center: np.ndarray)
| 40 | return self._yaw |
| 41 | |
| 42 | def get_vertexes(self, center: np.ndarray) -> np.ndarray: |
| 43 | points = np.array([[self.length, self.width], |
| 44 | [-self.length, self.width], |
| 45 | [-self.length, -self.width], |
| 46 | [self.length, -self.width]]) / 2 |
| 47 | rotation = np.array([[np.cos(self.yaw), -np.sin(self.yaw)], |
| 48 | [np.sin(self.yaw), np.cos(self.yaw)]]) |
| 49 | return center + np.array([rotation.dot(point) for point in points]) |
| 50 | |
| 51 | def in_collision(self, self_center: np.ndarray, |
| 52 | other_rectangle: 'Rectangle', |
no outgoing calls
no test coverage detected