| Copyright | (c) 2011 diagrams-lib team (see LICENSE) |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | diagrams-discuss@googlegroups.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Diagrams.TwoD.Types
Contents
Description
Basic types for two-dimensional Euclidean space.
- data V2 a :: * -> * = V2 !a !a
- class R1 t where
- class R1 t => R2 t where
- type P2 = Point V2
- type T2 = Transformation V2
- r2 :: (n, n) -> V2 n
- unr2 :: V2 n -> (n, n)
- mkR2 :: n -> n -> V2 n
- r2Iso :: Iso' (V2 n) (n, n)
- p2 :: (n, n) -> P2 n
- mkP2 :: n -> n -> P2 n
- unp2 :: P2 n -> (n, n)
- p2Iso :: Iso' (Point V2 n) (n, n)
- r2PolarIso :: RealFloat n => Iso' (V2 n) (n, Angle n)
- class HasR t where
2D Euclidean space
data V2 a :: * -> *
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
Minimal complete definition
Nothing
type T2 = Transformation V2 Source