hgeometry-0.11.0.0: Geometric Algorithms, Data structures, and Data types.

Data.Geometry.Box.Corners

Synopsis

# Documentation

data Corners a Source #

Constructors

 Corners !a !a !a !a
Instances
 Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodsfmap :: (a -> b) -> Corners a -> Corners b #(<\$) :: a -> Corners b -> Corners a # Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodspure :: 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 # Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodsfold :: Monoid m => Corners m -> 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 # Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodstraverse :: 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) # Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodstraverse1 :: Apply f => (a -> f b) -> Corners a -> f (Corners b) #sequence1 :: Apply f => Corners (f b) -> f (Corners b) # Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodsfold1 :: 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 detailsDefined in Data.Geometry.Box.Corners Methods(==) :: Corners a -> Corners a -> Bool #(/=) :: Corners a -> Corners a -> Bool # Ord a => Ord (Corners a) Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodscompare :: 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 detailsDefined in Data.Geometry.Box.Corners MethodsshowsPrec :: Int -> Corners a -> ShowS #show :: Corners a -> String #showList :: [Corners a] -> ShowS # Source # Instance detailsDefined in Data.Geometry.Box.Corners Associated Typestype Rep (Corners a) :: Type -> Type # Methodsfrom :: Corners a -> Rep (Corners a) x #to :: Rep (Corners a) x -> Corners a # Semigroup a => Semigroup (Corners a) Source # Instance detailsDefined 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 detailsDefined in Data.Geometry.Box.Corners Methodsmappend :: Corners a -> Corners a -> Corners a #mconcat :: [Corners a] -> Corners a # Ixed (Corners a) Source # Instance detailsDefined in Data.Geometry.Box.Corners Methodsix :: Index (Corners a) -> Traversal' (Corners a) (IxValue (Corners a)) # type Rep (Corners a) Source # Instance detailsDefined in Data.Geometry.Box.Corners type Rep (Corners a) = D1 (MetaData "Corners" "Data.Geometry.Box.Corners" "hgeometry-0.11.0.0-5Q7X7STHtn33ZJbJEL0QVy" 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 detailsDefined in Data.Geometry.Box.Corners type Index (Corners a) = InterCardinalDirection type IxValue (Corners a) Source # Instance detailsDefined 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

Gets the corners in a particular direction