about summary refs log tree commit diff homepage
path: root/brutalmaze/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'brutalmaze/utils.py')
-rw-r--r--brutalmaze/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/brutalmaze/utils.py b/brutalmaze/utils.py
index d198ef5..f972fc8 100644
--- a/brutalmaze/utils.py
+++ b/brutalmaze/utils.py
@@ -27,6 +27,11 @@ from pygame.gfxdraw import filled_polygon, aapolygon
 from .constants import *
 
 
+def round2(number):
+    """Round a number to an int."""
+    return int(round(number))
+
+
 def randsign():
     """Return either -1 or 1 (kind of) randomly."""
     return (pygame.time.get_ticks() & 1)*2 - 1