aboutsummaryrefslogtreecommitdiff
path: root/src/Utils/Geometry.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils/Geometry.elm')
-rw-r--r--src/Utils/Geometry.elm5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Utils/Geometry.elm b/src/Utils/Geometry.elm
index 085026f..323422b 100644
--- a/src/Utils/Geometry.elm
+++ b/src/Utils/Geometry.elm
@@ -5,7 +5,6 @@ module Utils.Geometry
) where
import Model.Vec2 (..)
-import Model.Board (boardSize)
polarToCartesian : Float -> Float -> Vec2
polarToCartesian angle dist =
@@ -16,8 +15,8 @@ polarToCartesian angle dist =
distance : Vec2 -> Vec2 -> Float
distance v1 v2 = sqrt((v2.x - v1.x)^2 + (v2.y - v1.y)^2)
-inBoard : Float -> Vec2 -> Vec2
-inBoard size pos =
+inBoard : Vec2 -> Float -> Vec2 -> Vec2
+inBoard boardSize size pos =
let leftX = -boardSize.x / 2 + size
rightX = boardSize.x / 2 - size
bottomY = -boardSize.y / 2 + size