about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--drawing.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/drawing.lua b/drawing.lua
index 54fb2c2..1bd6ac7 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -688,7 +688,7 @@ function Drawing.near(point, x,y)
 end
 
 function Drawing.pixels(n)  -- parts to pixels
-  return n*Drawing_width/256
+  return math.floor(n*Drawing_width/256)
 end
 function Drawing.coord(n)  -- pixels to parts
   return math.floor(n*256/Drawing_width)