Mid strictifying

This commit is contained in:
jgk
2021-07-29 23:42:27 +02:00
parent 67aa5c05c7
commit bd8ef3f416
22 changed files with 359 additions and 325 deletions
+20 -3
View File
@@ -2,8 +2,25 @@ module Geometry.Data
( Point2
, Point3
, Point4
, V2 (..)
, V3 (..)
, V4 (..)
, toV2
, toV3
, toV4
, uncurryV
)
where
type Point2 = (Float,Float)
type Point3 = (Float,Float,Float)
type Point4 = (Float,Float,Float,Float)
import Linear.V2
import Linear.V3
import Linear.V4
type Point2 = V2 Float
type Point3 = V3 Float
type Point4 = V4 Float
toV2 (a,b) = V2 a b
toV3 (a,b,c) = V3 a b c
toV4 (a,b,c,d) = V4 a b c d
uncurryV :: (a -> a -> b) -> V2 a -> b
uncurryV f (V2 x y) = f x y