From 83f0fd9d9006934463b9237e6e6ef9a2a795b988 Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Sun, 8 Sep 2013 17:02:03 +1000 Subject: dual support for python 3 --- snakegame/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'snakegame/utils.py') diff --git a/snakegame/utils.py b/snakegame/utils.py index 162c0b2..0339518 100644 --- a/snakegame/utils.py +++ b/snakegame/utils.py @@ -3,7 +3,9 @@ try: except ImportError: MaybeOrderedDict = dict -def scale_aspect((source_width, source_height), (target_width, target_height)): +def scale_aspect(source_size, target_size): + source_width, source_height = source_size + target_width, target_height = target_size source_aspect = float(source_width) / source_height target_aspect = float(target_width) / target_height if source_aspect > target_aspect: -- cgit v1.2.3