boundingboxes 0.2 → 0.2.1
raw patch · 3 files changed
+5/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/BoundingBox.hs +1/−0
- boundingboxes.cabal +3/−3
- tests/properties.hs +1/−1
Data/BoundingBox.hs view
@@ -20,6 +20,7 @@ import Data.Traversable as Traversable -- | The type of bounding box for arbitrary vector @f@. +-- The functions for this type assume that @f@ is a "zipping" 'Applicative'. data Box f a = Box (f a) (f a) deriving (Show, Eq, Ord, Functor, Foldable, Traversable, Read) instance Applicative f => Applicative (Box f) where
boundingboxes.cabal view
@@ -1,13 +1,13 @@ name: boundingboxes -version: 0.2 -synopsis: The type for 2D bounding box +version: 0.2.1 +synopsis: A generic boundingbox for an arbitrary vector -- description: homepage: https://github.com/fumieval/boundingboxes license: BSD3 license-file: LICENSE author: Fumiaki Kinoshita maintainer: fumiexcel@gmail.com --- copyright: +copyright: Copyright (c) 2014 Fumiaki Kinoshita category: Data build-type: Simple -- extra-source-files:
tests/properties.hs view
@@ -27,7 +27,7 @@ prop_resize bb (getReference -> ref) sz = nearZero $ bb ^. position ref - bb' ^. position ref where bb' = bb & size ref .~ getPositive sz :: Box V2 Float -prop_rearrange (getReference -> ref) bb pos = nearZero $ bb ^. size 0 - bb' ^. size 0 where +prop_rearrange (getReference -> ref) bb pos = norm (bb ^. size 0 - bb' ^. size 0) < 10e-4 where bb' = bb & position ref .~ pos :: Box V2 Float prop_construct (getReference -> ref) pos (getPositive -> sz) = nearZero (bb ^. size 0 - sz)