Fix main direction computing.

This commit is contained in:
Sergey Vartanov 2021-06-04 04:02:28 +03:00
parent 735f19428d
commit 0747f279c8

View file

@ -114,11 +114,12 @@ class Sector:
None otherwise. None otherwise.
""" """
if self.main_direction is not None: 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 return True
elif self.main_direction[0] < 0: else:
return False return False
return None
def __str__(self) -> str: def __str__(self) -> str:
return f"{self.start}-{self.end}" return f"{self.start}-{self.end}"