Animas-0.1: Updated version of Yampa: a library for programming hybrid systems.

Portabilitynon-portable (GHC extensions)
Stabilityprovisional
Maintainernilsson@cs.yale.edu

FRP.Animas.AffineSpace

Description

Affine space type relation.

Synopsis

Documentation

class (Floating a, VectorSpace v a) => AffineSpace p v a | p -> v, v -> a whereSource

Typeclass for an Affine space. Minimal complete definition: origin, '(.+^)', '(.-.)'

Methods

origin :: pSource

The origin value of an affine space

(.+^) :: p -> v -> pSource

Add a vector to a point, obtaining a new point.

(.-^) :: p -> v -> pSource

Subtract a vector from a point, obtaining a new point.

(.-.) :: p -> p -> vSource

Take the difference of two points, returning a vector

distance :: p -> p -> aSource

The scalar distance between two points.

Instances