HGamer3D-Data-0.4.0: Game Engine for the Haskell Programmer - Data Definitions and Utilities
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 aSource
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