mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 05:26:24 +02:00
Fix main direction computing.
This commit is contained in:
parent
735f19428d
commit
0747f279c8
1 changed files with 4 additions and 3 deletions
|
@ -114,11 +114,12 @@ class Sector:
|
|||
None otherwise.
|
||||
"""
|
||||
if self.main_direction is not None:
|
||||
if self.main_direction[0] > 0:
|
||||
if np.allclose(self.main_direction[0], 0):
|
||||
return None
|
||||
elif self.main_direction[0] > 0:
|
||||
return True
|
||||
elif self.main_direction[0] < 0:
|
||||
else:
|
||||
return False
|
||||
return None
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.start}-{self.end}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue