Skip to content

Commit

Permalink
Merge pull request #170 from ManuelMeder/Box2D_center_fix
Browse files Browse the repository at this point in the history
Fixed calculation of the Box2D center.
  • Loading branch information
oarriaga authored Feb 7, 2022
2 parents 6de73c0 + e14b233 commit 2e3a471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paz/abstract/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def score(self, score):

@property
def center(self):
x_center = self._coordinates[0] + self._coordinates[2] / 2.0
y_center = self._coordinates[1] + self._coordinates[3] / 2.0
x_center = (self._coordinates[0] + self._coordinates[2]) / 2.0
y_center = (self._coordinates[1] + self._coordinates[3]) / 2.0
return x_center, y_center

@property
Expand Down

0 comments on commit 2e3a471

Please sign in to comment.