| Copyright | (C) 2012-2015 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | Trustworthy |
| Language | Haskell98 |
Linear.V2
Description
2-D Vectors
Documentation
A 2-dimensional vector
>>>pure 1 :: V2 IntV2 1 1
>>>V2 1 2 + V2 3 4V2 4 6
>>>V2 1 2 * V2 3 4V2 3 8
>>>sum (V2 1 2)3
Constructors
| V2 !a !a |
Instances
A space that has at least 1 basis vector _x.
Minimal complete definition
class R1 t => R2 t where Source #
Minimal complete definition
Methods
>>>V2 1 2 ^._y2
>>>V2 1 2 & _y .~ 3V2 1 3