LambdaHack-0.2.0: A roguelike game engine in early and very active development

Safe HaskellNone

Game.LambdaHack.PointXY

Description

Basic cartesian geometry operations on 2D points.

Synopsis

Documentation

type X = IntSource

Spacial dimension for points and vectors.

type Y = IntSource

Spacial dimension for points and vectors.

newtype PointXY Source

2D points in cartesian representation.

Constructors

PointXY (X, Y) 

fromTo :: PointXY -> PointXY -> [PointXY]Source

A list of all points on a straight vertical or straight horizontal line between two points. Fails if no such line exists.

sortPointXY :: (PointXY, PointXY) -> (PointXY, PointXY)Source

Sort the sequence of two points, in the derived lexicographic order.