aboutsummaryrefslogtreecommitdiff
path: root/src/Utils
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-15 09:40:58 +0100
committerJoris Guyonvarch2015-03-15 09:40:58 +0100
commitce6775641639943a2aee00fa9c2d684aa434bc21 (patch)
treee5c1b37525cf83f588d82fbf8977ae2839b6e41f /src/Utils
parent87386e8b148c2536214fdaf6c3140853c751d7b4 (diff)
Moving boardSize to Game model
Diffstat (limited to 'src/Utils')
-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