Copyright | (c) Antony Courtney and Henrik Nilsson, Yale University, 2003 |
---|---|

License | BSD-style (see the LICENSE file in the distribution) |

Maintainer | nilsson@cs.yale.edu |

Stability | provisional |

Portability | non-portable (GHC extensions) |

Safe Haskell | Safe |

Language | Haskell98 |

Vector space type relation and basic instances.

# Documentation

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

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

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

VectorSpace Double Double Source | |

VectorSpace Float Float Source | |

RealFloat a => VectorSpace (Vector2 a) a Source | |

RealFloat a => VectorSpace (Vector3 a) a Source | |

(Eq a, Floating a) => VectorSpace (a, a) a Source | |

(Eq a, Floating a) => VectorSpace (a, a, a) a Source | |

(Eq a, Floating a) => VectorSpace (a, a, a, a) a Source | |

(Eq a, Floating a) => VectorSpace (a, a, a, a, a) a Source |