hgeometry-0.12.0.0: Geometric Algorithms, Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.Geometry.Box.Corners

Description

 
Synopsis

Documentation

data Corners a Source #

A Quadrant data type

Constructors

Corners !a !a !a !a 

Instances

Instances details
Functor Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

fmap :: (a -> b) -> Corners a -> Corners b #

(<$) :: a -> Corners b -> Corners a #

Applicative Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

pure :: a -> Corners a #

(<*>) :: Corners (a -> b) -> Corners a -> Corners b #

liftA2 :: (a -> b -> c) -> Corners a -> Corners b -> Corners c #

(*>) :: Corners a -> Corners b -> Corners b #

(<*) :: Corners a -> Corners b -> Corners a #

Foldable Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

fold :: Monoid m => Corners m -> m #

foldMap :: Monoid m => (a -> m) -> Corners a -> m #

foldMap' :: Monoid m => (a -> m) -> Corners a -> m #

foldr :: (a -> b -> b) -> b -> Corners a -> b #

foldr' :: (a -> b -> b) -> b -> Corners a -> b #

foldl :: (b -> a -> b) -> b -> Corners a -> b #

foldl' :: (b -> a -> b) -> b -> Corners a -> b #

foldr1 :: (a -> a -> a) -> Corners a -> a #

foldl1 :: (a -> a -> a) -> Corners a -> a #

toList :: Corners a -> [a] #

null :: Corners a -> Bool #

length :: Corners a -> Int #

elem :: Eq a => a -> Corners a -> Bool #

maximum :: Ord a => Corners a -> a #

minimum :: Ord a => Corners a -> a #

sum :: Num a => Corners a -> a #

product :: Num a => Corners a -> a #

Traversable Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

traverse :: Applicative f => (a -> f b) -> Corners a -> f (Corners b) #

sequenceA :: Applicative f => Corners (f a) -> f (Corners a) #

mapM :: Monad m => (a -> m b) -> Corners a -> m (Corners b) #

sequence :: Monad m => Corners (m a) -> m (Corners a) #

Traversable1 Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

traverse1 :: Apply f => (a -> f b) -> Corners a -> f (Corners b) #

sequence1 :: Apply f => Corners (f b) -> f (Corners b) #

Foldable1 Corners Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

fold1 :: Semigroup m => Corners m -> m #

foldMap1 :: Semigroup m => (a -> m) -> Corners a -> m #

toNonEmpty :: Corners a -> NonEmpty a #

Eq a => Eq (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

(==) :: Corners a -> Corners a -> Bool #

(/=) :: Corners a -> Corners a -> Bool #

Ord a => Ord (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

compare :: Corners a -> Corners a -> Ordering #

(<) :: Corners a -> Corners a -> Bool #

(<=) :: Corners a -> Corners a -> Bool #

(>) :: Corners a -> Corners a -> Bool #

(>=) :: Corners a -> Corners a -> Bool #

max :: Corners a -> Corners a -> Corners a #

min :: Corners a -> Corners a -> Corners a #

Show a => Show (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

showsPrec :: Int -> Corners a -> ShowS #

show :: Corners a -> String #

showList :: [Corners a] -> ShowS #

Generic (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Associated Types

type Rep (Corners a) :: Type -> Type #

Methods

from :: Corners a -> Rep (Corners a) x #

to :: Rep (Corners a) x -> Corners a #

Semigroup a => Semigroup (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

(<>) :: Corners a -> Corners a -> Corners a #

sconcat :: NonEmpty (Corners a) -> Corners a #

stimes :: Integral b => b -> Corners a -> Corners a #

Monoid a => Monoid (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

mempty :: Corners a #

mappend :: Corners a -> Corners a -> Corners a #

mconcat :: [Corners a] -> Corners a #

Ixed (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

Methods

ix :: Index (Corners a) -> Traversal' (Corners a) (IxValue (Corners a)) #

type Rep (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

type Rep (Corners a) = D1 ('MetaData "Corners" "Data.Geometry.Box.Corners" "hgeometry-0.12.0.0-3A6BqD11e4bE4Mwo2IplDZ" 'False) (C1 ('MetaCons "Corners" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_northWest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "_northEast") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)) :*: (S1 ('MetaSel ('Just "_southEast") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "_southWest") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))))
type Index (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

type IxValue (Corners a) Source # 
Instance details

Defined in Data.Geometry.Box.Corners

type IxValue (Corners a) = a

northWest :: forall a. Lens' (Corners a) a Source #

northEast :: forall a. Lens' (Corners a) a Source #

southEast :: forall a. Lens' (Corners a) a Source #

southWest :: forall a. Lens' (Corners a) a Source #

corners :: Num r => Rectangle p r -> Corners (Point 2 r :+ p) Source #

Get the corners of a rectangle, the order is: (TopLeft, TopRight, BottomRight, BottomLeft). The extra values in the Top points are taken from the Top point, the extra values in the Bottom points are taken from the Bottom point

cornersInDirection :: CardinalDirection -> Corners p -> Two p Source #

Gets the corners in a particular direction