Created
January 23, 2013 05:26
-
-
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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