eventloop-0.8.1.2: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together.

Safe HaskellSafe
LanguageHaskell2010

Eventloop.Utility.Vectors

Synopsis

Documentation

type Angle Source

Arguments

 = Float

In degrees

type X = Float Source

type Y = Float Source

type Offset = (X, Y) Source

class Coord a where Source

Methods

x :: a -> X Source

y :: a -> Y Source

class ExtremaCoord a where Source

Methods

xMin :: a -> X Source

xMax :: a -> X Source

yMin :: a -> Y Source

yMax :: a -> Y Source

downPerpendicular :: Point -> Point -> Point Source

Returns the vector perpendicular on the given vector between the 2 points. Always has positive y and vector length 1; y is inverted in canvas

upPerpendicular :: Point -> Point -> Point Source

Returns the vector perpendicular on the given vector between the 2 points. Always has negative y and vector length 1; y is inverted in canvas

class Translate a where Source

Methods

translate :: Point -> a -> a Source

class Coord a => Vector2D a where Source

Methods

(|+|) :: a -> a -> a Source

(|-|) :: a -> a -> a Source

(|/) :: Real b => a -> b -> a Source

(|*) :: Real b => a -> b -> a Source

negateVector :: a -> a Source

class ToPoint a where Source

Methods

toPoint :: a -> Point Source