module Graphics.Gloss.Data.Point
( Point, Path
, pointInBox)
where
import Graphics.Gloss.Data.Picture
pointInBox
:: Point
-> Point
-> Point -> Bool
pointInBox :: Point -> Point -> Point -> Bool
pointInBox (Float
x0, Float
y0) (Float
x1, Float
y1) (Float
x2, Float
y2)
= Float
x0 Float -> Float -> Bool
forall a. Ord a => a -> a -> Bool
>= Float -> Float -> Float
forall a. Ord a => a -> a -> a
min Float
x1 Float
x2
Bool -> Bool -> Bool
&& Float
x0 Float -> Float -> Bool
forall a. Ord a => a -> a -> Bool
<= Float -> Float -> Float
forall a. Ord a => a -> a -> a
max Float
x1 Float
x2
Bool -> Bool -> Bool
&& Float
y0 Float -> Float -> Bool
forall a. Ord a => a -> a -> Bool
>= Float -> Float -> Float
forall a. Ord a => a -> a -> a
min Float
y1 Float
y2
Bool -> Bool -> Bool
&& Float
y0 Float -> Float -> Bool
forall a. Ord a => a -> a -> Bool
<= Float -> Float -> Float
forall a. Ord a => a -> a -> a
max Float
y1 Float
y2