about summary refs log tree commit diff stats
path: root/geom.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-17 22:36:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-17 22:43:41 -0700
commit222a11a8dd0c8b5b68b5628928a38f05d0a3d13c (patch)
tree5454f0927eac37ea4d35774acc633f766554c130 /geom.lua
parent82742330f8760865bbfc21705a809dcb61403d7d (diff)
downloadtext.love-222a11a8dd0c8b5b68b5628928a38f05d0a3d13c.tar.gz
split keyboard handling between Text and Drawing
Diffstat (limited to 'geom.lua')
-rw-r--r--geom.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/geom.lua b/geom.lua
index 7b71df3..20cc5dd 100644
--- a/geom.lua
+++ b/geom.lua
@@ -11,10 +11,10 @@ function geom.on_shape(x,y, drawing, shape)
     return geom.on_polygon(x,y, drawing, shape)
   elseif shape.mode == 'circle' then
     local center = drawing.points[shape.center]
-    return math.dist(center.x,center.y, x,y) == shape.radius
+    return geom.dist(center.x,center.y, x,y) == shape.radius
   elseif shape.mode == 'arc' then
     local center = drawing.points[shape.center]
-    local dist = math.dist(center.x,center.y, x,y)
+    local dist = geom.dist(center.x,center.y, x,y)
     if dist < shape.radius*0.95 or dist > shape.radius*1.05 then
       return false
     end
@@ -109,7 +109,7 @@ end
 
 -- is the line between x,y and cx,cy at an angle between s and e?
 function geom.angle_between(ox,oy, x,y, s,e)
-  local angle = math.angle(ox,oy, x,y)
+  local angle = geom.angle(ox,oy, x,y)
   if s > e then
     s,e = e,s
   end