Add __str__ for Heading.

This commit is contained in:
Dan Albert
2023-07-29 21:50:02 -07:00
committed by Raffson
parent 60172d0e52
commit ee1fa78ecd

View File

@@ -397,6 +397,9 @@ class Heading:
def __sub__(self, other: Heading) -> Heading:
return Heading.from_degrees(self.degrees - other.degrees)
def __str__(self) -> str:
return f"{self.heading_in_degrees}°"
@dataclass(frozen=True, order=True)
class Pressure: