Yampa-0.11.1: Library for programming hybrid systems.

Copyright (c) Antony Courtney and Henrik Nilsson Yale University 2003 BSD-style (see the LICENSE file in the distribution) nilsson@cs.yale.edu provisional non-portable (GHC extensions) Safe Haskell98

FRP.Yampa.AffineSpace

Description

Affine space type relation.

Synopsis

# Documentation

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

Affine Space type relation.

An affine space is a set (type) p, and an associated vector space v over a field a.

Minimal complete definition

Methods

origin :: p Source #

Origin of the affine space.

(.+^) :: p -> v -> p infix 6 Source #

Addition of affine point and vector.

(.-^) :: p -> v -> p infix 6 Source #

Subtraction of affine point and vector.

(.-.) :: p -> p -> v infix 6 Source #

Subtraction of two points in the affine space, giving a vector.

distance :: p -> p -> a Source #

Distance between two points in the affine space, same as the norm of the vector they form (see '(.-.)'.

Instances
 RealFloat a => AffineSpace (Point3 a) (Vector3 a) a Source # Instance detailsDefined in FRP.Yampa.Point3 Methods(.+^) :: Point3 a -> Vector3 a -> Point3 a Source #(.-^) :: Point3 a -> Vector3 a -> Point3 a Source #(.-.) :: Point3 a -> Point3 a -> Vector3 a Source #distance :: Point3 a -> Point3 a -> a Source # RealFloat a => AffineSpace (Point2 a) (Vector2 a) a Source # Instance detailsDefined in FRP.Yampa.Point2 Methods(.+^) :: Point2 a -> Vector2 a -> Point2 a Source #(.-^) :: Point2 a -> Vector2 a -> Point2 a Source #(.-.) :: Point2 a -> Point2 a -> Vector2 a Source #distance :: Point2 a -> Point2 a -> a Source #