HGamer3D-Data-0.5.0: Toolset for the Haskell Game Programmer - Data Definitions
HGamer3D.Data.Geometry2D
Contents
Description
Type definitions for 2D geometry
Synopsis
data Point a Source
A point has two coordinates an x and y one
Constructors
Fields
data Num a => Rectangle a Source
A rectangle has an a position as x and y and widht and height
Instances
rectFromPoints :: Num a => Point a -> Point a -> Rectangle a Source
derive a rectangle from upper left and lower right points
pointsFromRect :: Num a => Rectangle a -> (Point a, Point a) Source
get upper left and lower right point from a rect