| 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 | Haskell2010 |
Linear.V3
Description
3-D Vectors
Synopsis
- data V3 a = V3 !a !a !a
- cross :: Num a => V3 a -> V3 a -> V3 a
- triple :: Num a => V3 a -> V3 a -> V3 a -> a
- class R1 (t :: Type -> Type) where
- class R1 t => R2 (t :: Type -> Type) where
- _yx :: forall (t :: Type -> Type) a. R2 t => Lens' (t a) (V2 a)
- class R2 t => R3 (t :: Type -> Type) where
- _xz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
- _yz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
- _zx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
- _zy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a)
- _xzy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
- _yxz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
- _yzx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
- _zxy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
- _zyx :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a)
- ex :: forall (t :: Type -> Type). R1 t => E t
- ey :: forall (t :: Type -> Type). R2 t => E t
- ez :: forall (t :: Type -> Type). R3 t => E t
Documentation
A 3-dimensional vector
Constructors
| V3 !a !a !a |
Instances
class R1 (t :: Type -> Type) where Source #
A space that has at least 1 basis vector _x.
class R1 t => R2 (t :: Type -> Type) where Source #
Minimal complete definition
Methods
>>>V2 1 2 ^._y2
>>>V2 1 2 & _y .~ 3V2 1 3