Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Commit 876b141

Browse files
committed
Fixed midpoint to actually represent midpoint.
1 parent 229dd45 commit 876b141

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/animation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ def __apply(self, op: Callable, other: Coord.Operand) -> Coord:
4242
y = op(self.y, other.y)
4343
return Coord(x, y)
4444

45-
@property
46-
def midpoint(self) -> Coord:
47-
return self // Coord(2, 2)
45+
def midpoint(self, other: Coord) -> Coord:
46+
return (self + other) // 2
4847

4948
__add__ = partialmethod(__apply, operator.add)
5049
__sub__ = partialmethod(__apply, operator.sub)

0 commit comments

Comments
 (0)