Safe Haskell | Safe-Infered |
---|
- data Rectangle a = Rectangle !a !a !a !a
- s :: NFData a => a -> t -> t
- left :: Rectangle t -> t
- right :: Num a => Rectangle a -> a
- top :: Rectangle t -> t
- bottom :: Num a => Rectangle a -> a
- topLeft :: Rectangle t -> (t, t)
- topRight :: Num t => Rectangle t -> (t, t)
- bottomLeft :: Num t => Rectangle t -> (t, t)
- bottomRight :: Num t => Rectangle t -> (t, t)
- vertices :: Num t => Rectangle t -> [(t, t)]
- rSize :: Rectangle t -> (t, t)
- rArea :: Num a => Rectangle a -> a
- center :: Fractional t => Rectangle t -> (t, t)
- centerI :: Integral t => Rectangle t -> (t, t)
- around :: (Fractional a, Ord a) => (a, a) -> (a, a) -> Rectangle a
- mkRectangle :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle a
- mkRectCorners :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle a
- prop_Corners :: (Int, Int) -> (Int, Int) -> Bool
- mkRec :: ((Integer, Integer), (Integer, Integer)) -> Rectangle Integer
- fromPtSize :: (a, a) -> (a, a) -> Rectangle a
- inCoords :: Num t => Rectangle t -> Rectangle t -> ((t, t), (t, t)) -> Rectangle (t, t)
- inCoords' :: Num t => Rectangle t -> (t, t) -> (t, t)
- enlargeToNthPower :: (Integral a, Integral b) => b -> Rectangle a -> Rectangle a
- intersection :: (Num a, Ord a) => Rectangle a -> Rectangle a -> Rectangle a
- propIntersectionArea :: (Num a, Ord a) => Rectangle a -> Rectangle a -> Bool
- propIntersectionCommutes :: (Num a, Ord a) => Rectangle a -> Rectangle a -> Bool
- intersects :: (Num a, Ord a) => Rectangle a -> Rectangle a -> Bool
- contains :: (Num a, Ord a) => Rectangle a -> Rectangle a -> Bool
- intersect1D :: Ord a => (a, a) -> (a, a) -> Bool
- prop_intersect1DCommutes :: Ord a => (a, a) -> (a, a) -> Bool
- prop_intersectsCommutes :: ((Integer, Integer), (Integer, Integer)) -> ((Integer, Integer), (Integer, Integer)) -> Bool
- tile :: (Enum a, Num a, Ord a) => (a, a) -> (a, a) -> Rectangle a -> [Rectangle a]
- scale :: (Integral a3, Integral a, RealFrac a2, RealFrac a1) => (a1, a2) -> Rectangle a3 -> Rectangle a
- fromInt :: (Integral a, Num a1) => Rectangle a -> Rectangle a1
- roundR :: (Integral a1, RealFrac a) => Rectangle a -> Rectangle a1
Documentation
Rectangle !a !a !a !a |
bottomLeft :: Num t => Rectangle t -> (t, t)Source
bottomRight :: Num t => Rectangle t -> (t, t)Source
center :: Fractional t => Rectangle t -> (t, t)Source
around :: (Fractional a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource
Create rectangle around point (x,y)
mkRectangle :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource
mkRectCorners :: (Num a, Ord a) => (a, a) -> (a, a) -> Rectangle aSource
fromPtSize :: (a, a) -> (a, a) -> Rectangle aSource
inCoords :: Num t => Rectangle t -> Rectangle t -> ((t, t), (t, t)) -> Rectangle (t, t)Source
Return rectangle r2 in coordinate system defined by r1
inCoords' :: Num t => Rectangle t -> (t, t) -> (t, t)Source
Return a point in coordinates of given rectangle
enlargeToNthPower :: (Integral a, Integral b) => b -> Rectangle a -> Rectangle aSource
Adjust the size of the rectangle to be divisible by 2^n.
intersect1D :: Ord a => (a, a) -> (a, a) -> BoolSource
prop_intersect1DCommutes :: Ord a => (a, a) -> (a, a) -> BoolSource
prop_intersectsCommutes :: ((Integer, Integer), (Integer, Integer)) -> ((Integer, Integer), (Integer, Integer)) -> BoolSource
tile :: (Enum a, Num a, Ord a) => (a, a) -> (a, a) -> Rectangle a -> [Rectangle a]Source
Create a tiling of a rectangles.