gloss-1.7.8.3: Painless 2D vector graphics, animations and simulations.

Safe HaskellSafe-Inferred

Graphics.Gloss.Data.Point

Synopsis

Documentation

type Point = (Float, Float)Source

A point on the x-y plane. Points can also be treated as Vectors, so Graphics.Gloss.Data.Vector may also be useful.

pointInBox :: Point -> Point -> Point -> BoolSource

Test whether a point lies within a rectangular box that is oriented on the x-y plane. The points P1-P2 are opposing points of the box, but need not be in a particular order.

    P2 +-------+
       |       |
       | + P0  |
       |       |
       +-------+ P1