eventloop-0.8.2.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 #

data Point Source #

Constructors

Point (X, Y) 

Instances

Eq Point Source # 

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

Show Point Source # 

Methods

showsPrec :: Int -> Point -> ShowS #

show :: Point -> String #

showList :: [Point] -> ShowS #

Generic Point Source # 

Associated Types

type Rep Point :: * -> * #

Methods

from :: Point -> Rep Point x #

to :: Rep Point x -> Point #

NFData Point Source # 

Methods

rnf :: Point -> () #

RotateLeftAround Point Source # 
ToPolarCoord Point Source # 
Vector2D Point Source # 
Coord Point Source # 

Methods

x :: Point -> X Source #

y :: Point -> Y Source #

ExtremaCoord [Point] Source # 

Methods

xMin :: [Point] -> X Source #

xMax :: [Point] -> X Source #

yMin :: [Point] -> Y Source #

yMax :: [Point] -> Y Source #

type Rep Point Source # 
type Rep Point = D1 (MetaData "Point" "Eventloop.Utility.Vectors" "eventloop-0.8.2.2-F2V5swFLstPEfTB4BPkr2w" False) (C1 (MetaCons "Point" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (X, Y))))

class Coord a where Source #

Minimal complete definition

x, y

Methods

x :: a -> X Source #

y :: a -> Y Source #

Instances

class ExtremaCoord a where Source #

Minimal complete definition

xMin, xMax, yMin, yMax

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 #

Minimal complete definition

translate

Methods

translate :: Point -> a -> a Source #

class ToPoint a where Source #

Minimal complete definition

toPoint

Methods

toPoint :: a -> Point Source #

class ToPolarCoord a where Source #

Minimal complete definition

toPolarCoord