Skip to content

Instantly share code, notes, and snippets.

@Darthfett
Created January 23, 2013 05:26
Show Gist options
  • Save Darthfett/4602297 to your computer and use it in GitHub Desktop.
Save Darthfett/4602297 to your computer and use it in GitHub Desktop.
Small hack to convert normal coordinates to pygame coordinates (where y is 0 at bottom left and positive is up, instead of top left corner and positive is down).
def flip_y(y):
"""Small hack to convert normal coordinates to pygame coordinates"""
return -y+GAME_WINDOW_HEIGHT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment