From 5701331008c4a0173347df8d15a591f9bee56bd8 Mon Sep 17 00:00:00 2001 From: Gary Martin Date: Wed, 06 Oct 2010 12:37:25 +0000 Subject: Fix crash on F14 due to Python/gtk+/pygame float/int sensitivity SL#2363. --- (limited to 'helpers.py') diff --git a/helpers.py b/helpers.py index 889534b..47dfbe4 100644 --- a/helpers.py +++ b/helpers.py @@ -137,4 +137,9 @@ def decomposePoly(vertices): nv -= 1 # reset error detection count = 2 * nv - return result \ No newline at end of file + return result + +def cast_tuple_to_int(tuple): + """Cast tuple values to ints to avoid gtk+ and pygame's dislike of floats. + """ + return [int(i) for i in tuple] -- cgit v0.9.1