Portability | non-portable (GHC extensions) |
---|---|

Stability | provisional |

Maintainer | nilsson@cs.yale.edu |

Affine space type relation.

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

# 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`

, '(.+^)', '(.-.)'

The origin value of an affine space

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

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

Take the difference of two points, returning a vector

The scalar distance between two points.

RealFloat a => AffineSpace (Point2 a) (Vector2 a) a | |

RealFloat a => AffineSpace (Point3 a) (Vector3 a) a |