Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Representation of an axis-aligned rectangle on a 2D plane, with one of its corners being a designated origin point.
Synopsis
- data Rect a = Rect {}
- height :: Num a => Rect a -> a
- width :: Num a => Rect a -> a
- x_max :: (Num a, Ord a) => Rect a -> a
- x_min :: (Num a, Ord a) => Rect a -> a
- x_terminus :: Num a => Rect a -> a
- y_max :: (Num a, Ord a) => Rect a -> a
- y_min :: (Num a, Ord a) => Rect a -> a
- y_terminus :: Num a => Rect a -> a
Documentation
An axis-aligned rectangle on a 2D plane.
Rect | |
|
Instances
Eq a => Eq (Rect a) | |
Read a => Read (Rect a) | |
Defined in Data.Text.ParagraphLayout.Internal.Rect | |
Show a => Show (Rect a) | |
height :: Num a => Rect a -> a #
Absolute difference between the Y coordinates of the rectangle's sides.
width :: Num a => Rect a -> a #
Absolute difference between the X coordinates of the rectangle's sides.
x_max :: (Num a, Ord a) => Rect a -> a #
The larger of the two X coordinates of the rectangle's edges.
x_min :: (Num a, Ord a) => Rect a -> a #
The smaller of the two X coordinates of the rectangle's edges.
x_terminus :: Num a => Rect a -> a #
X coordinate of the corner opposite of the origin.
y_max :: (Num a, Ord a) => Rect a -> a #
The larger of the two Y coordinates of the rectangle's edges.
y_min :: (Num a, Ord a) => Rect a -> a #
The smaller of the two Y coordinates of the rectangle's edges.
y_terminus :: Num a => Rect a -> a #
Y coordinate of the corner opposite of the origin.