Yampa-0.9.7: Library for programming hybrid systems.

Copyright(c) Antony Courtney and Henrik Nilsson, Yale University, 2003
LicenseBSD-style (see the LICENSE file in the distribution)
Maintainernilsson@cs.yale.edu
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell98

FRP.Yampa.VectorSpace

Description

Vector space type relation and basic instances.

Documentation

class (Eq a, Floating a) => VectorSpace v a | v -> a where Source

Minimal complete definition

zeroVector, (*^), (^+^), dot

Methods

zeroVector :: v Source

(*^) :: a -> v -> v infixr 9 Source

(^/) :: v -> a -> v infixl 9 Source

negateVector :: v -> v Source

(^+^) :: v -> v -> v infixl 6 Source

(^-^) :: v -> v -> v infixl 6 Source

dot :: v -> v -> a infix 7 Source

norm :: v -> a Source

normalize :: v -> v Source

Instances

VectorSpace Double Double 
VectorSpace Float Float 
RealFloat a => VectorSpace (Vector2 a) a 
RealFloat a => VectorSpace (Vector3 a) a 
(Eq a, Floating a) => VectorSpace (a, a) a 
(Eq a, Floating a) => VectorSpace (a, a, a) a 
(Eq a, Floating a) => VectorSpace (a, a, a, a) a 
(Eq a, Floating a) => VectorSpace (a, a, a, a, a) a