Skip to content

Commit

Permalink
feat: add __hash__ to geometry.Point
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Feb 5, 2025
1 parent a4b7690 commit e6cc5b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rosys/geometry/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ def __truediv__(self, factor) -> Point:

def __str__(self) -> str:
return f'Point({self.x:.3f}, {self.y:.3f})'

def __hash__(self) -> int:
return hash((self.x, self.y))

0 comments on commit e6cc5b2

Please sign in to comment.