Use tasty for tests, fix bug in circOnLine
This commit is contained in:
+6
-5
@@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
module ShapePicture
|
||||
( emptyBlank
|
||||
, translateSPf
|
||||
@@ -8,8 +9,7 @@ module ShapePicture
|
||||
, noShape
|
||||
, _spShape
|
||||
, _spPicture
|
||||
)
|
||||
where
|
||||
) where
|
||||
import Shape
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -18,11 +18,12 @@ import Data.Bifunctor
|
||||
|
||||
type SPic = (Shape, Picture)
|
||||
|
||||
-- should all this be inlined/inlinable?
|
||||
noPic :: Shape -> SPic
|
||||
noPic sh = (sh,mempty)
|
||||
noPic = (,mempty)
|
||||
|
||||
noShape :: Picture -> SPic
|
||||
noShape pic = (mempty,pic)
|
||||
noShape = (mempty,)
|
||||
|
||||
_spShape :: SPic -> Shape
|
||||
_spShape = fst
|
||||
@@ -30,7 +31,7 @@ _spPicture :: SPic -> Picture
|
||||
_spPicture = snd
|
||||
|
||||
emptyBlank :: SPic
|
||||
emptyBlank = (emptySH,blank)
|
||||
emptyBlank = mempty
|
||||
|
||||
translateSPf :: Float -> Float -> SPic -> SPic
|
||||
translateSPf x y = bimap (translateSH (V3 x y 0)) (translate x y)
|
||||
|
||||
Reference in New Issue
Block a user