diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2020-04-28 12:34:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-28 18:34:05 +0200 |
| commit | cb2b4e3522cb7f426ba5ad3e68deb9e6ccc581ec (patch) | |
| tree | 2a2f38823c3c9f0b5439ce2aa7c9040299109292 /lib/utils/geometry.py | |
| parent | eb526927e16954390d06929535d6f5c3766b5f6c (diff) | |
electron simulator (#531)
Diffstat (limited to 'lib/utils/geometry.py')
| -rw-r--r-- | lib/utils/geometry.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/geometry.py b/lib/utils/geometry.py index 647636c8..bae32c32 100644 --- a/lib/utils/geometry.py +++ b/lib/utils/geometry.py @@ -63,6 +63,9 @@ class Point: self.x = x self.y = y + def __json__(self): + return vars(self) + def __add__(self, other): return Point(self.x + other.x, self.y + other.y) |
