Start to create debug datatypes

This commit is contained in:
2023-03-29 11:35:39 +01:00
parent 2c13f52ce8
commit 5b5ed519dd
5 changed files with 20 additions and 62 deletions
+4
View File
@@ -5,6 +5,7 @@ module Dodge.Base.Window (
screenPolygon,
screenPolygonBord,
screenBox,
pointIsOnScreen,
) where
import Control.Lens
@@ -54,3 +55,6 @@ screenBox w = rectNSWE hh (- hh) (- hw) hw
where
hw = halfWidth w
hh = halfHeight w
pointIsOnScreen :: Configuration -> Camera -> Point2 -> Bool
pointIsOnScreen cfig w p = pointInPolygon p $ screenPolygon cfig w