Skip to content

Commit

Permalink
Moved scenicToScreenVal int cast.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Vin committed Oct 30, 2024
1 parent fead759 commit 2a8b24f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scenic/simulators/newtonian/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ def addRegion(region, color, width=1):
def scenicToScreenVal(self, pos):
x, y = pos[:2]

screen_x = int((x - self.min_x) * self.screenScaling)
screen_y = HEIGHT - 1 - int((y - self.min_y) * self.screenScaling)
screen_x = (x - self.min_x) * self.screenScaling
screen_y = HEIGHT - 1 - (y - self.min_y) * self.screenScaling

screen_x = screen_x + self.screenTranslation[0]
screen_y = screen_y + self.screenTranslation[1]

return screen_x, screen_y
return int(screen_x), int(screen_y)

def createObjectInSimulator(self, obj):
# Set actor's initial speed
Expand Down

0 comments on commit 2a8b24f

Please sign in to comment.