From cb2b4e3522cb7f426ba5ad3e68deb9e6ccc581ec Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 28 Apr 2020 12:34:05 -0400 Subject: electron simulator (#531) --- lib/utils/geometry.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/utils/geometry.py') 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) -- cgit v1.2.3