linear-1.21.5: Linear Algebra

Linear.V3

Description

3-D Vectors

Synopsis

# Documentation

data V3 a Source #

A 3-dimensional vector

Constructors

 V3 !a !a !a

#### Instances

Instances details

cross :: Num a => V3 a -> V3 a -> V3 a Source #

cross product

triple :: Num a => V3 a -> V3 a -> V3 a -> a Source #

scalar triple product

class R1 t where Source #

A space that has at least 1 basis vector _x.

Methods

_x :: Lens' (t a) a Source #

>>> V1 2 ^._x
2

>>> V1 2 & _x .~ 3
V1 3


#### Instances

Instances details
 Source # Instance detailsDefined in Linear.V1 Methods_x :: Lens' (Identity a) a Source # Source # Instance detailsDefined in Linear.V1 Methods_x :: Lens' (V1 a) a Source # Source # Instance detailsDefined in Linear.V2 Methods_x :: Lens' (V2 a) a Source # Source # Instance detailsDefined in Linear.V3 Methods_x :: Lens' (V3 a) a Source # Source # Instance detailsDefined in Linear.V4 Methods_x :: Lens' (V4 a) a Source # Source # Instance detailsDefined in Linear.Quaternion Methods_x :: Lens' (Quaternion a) a Source # R1 f => R1 (Point f) Source # Instance detailsDefined in Linear.Affine Methods_x :: Lens' (Point f a) a Source #

class R1 t => R2 t where Source #

A space that distinguishes 2 orthogonal basis vectors _x and _y, but may have more.

Minimal complete definition

_xy

Methods

_y :: Lens' (t a) a Source #

>>> V2 1 2 ^._y
2

>>> V2 1 2 & _y .~ 3
V2 1 3


_xy :: Lens' (t a) (V2 a) Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Linear.V2 Methods_y :: Lens' (V2 a) a Source #_xy :: Lens' (V2 a) (V2 a) Source # Source # Instance detailsDefined in Linear.V3 Methods_y :: Lens' (V3 a) a Source #_xy :: Lens' (V3 a) (V2 a) Source # Source # Instance detailsDefined in Linear.V4 Methods_y :: Lens' (V4 a) a Source #_xy :: Lens' (V4 a) (V2 a) Source # Source # Instance detailsDefined in Linear.Quaternion Methods_y :: Lens' (Quaternion a) a Source #_xy :: Lens' (Quaternion a) (V2 a) Source # R2 f => R2 (Point f) Source # Instance detailsDefined in Linear.Affine Methods_y :: Lens' (Point f a) a Source #_xy :: Lens' (Point f a) (V2 a) Source #

_yx :: R2 t => Lens' (t a) (V2 a) Source #

>>> V2 1 2 ^. _yx
V2 2 1


class R2 t => R3 t where Source #

A space that distinguishes 3 orthogonal basis vectors: _x, _y, and _z. (It may have more)

Methods

_z :: Lens' (t a) a Source #

>>> V3 1 2 3 ^. _z
3


_xyz :: Lens' (t a) (V3 a) Source #

#### Instances

Instances details
 Source # Instance detailsDefined in Linear.V3 Methods_z :: Lens' (V3 a) a Source #_xyz :: Lens' (V3 a) (V3 a) Source # Source # Instance detailsDefined in Linear.V4 Methods_z :: Lens' (V4 a) a Source #_xyz :: Lens' (V4 a) (V3 a) Source # Source # Instance detailsDefined in Linear.Quaternion Methods_z :: Lens' (Quaternion a) a Source #_xyz :: Lens' (Quaternion a) (V3 a) Source # R3 f => R3 (Point f) Source # Instance detailsDefined in Linear.Affine Methods_z :: Lens' (Point f a) a Source #_xyz :: Lens' (Point f a) (V3 a) Source #

_xz :: R3 t => Lens' (t a) (V2 a) Source #

_yz :: R3 t => Lens' (t a) (V2 a) Source #

_zx :: R3 t => Lens' (t a) (V2 a) Source #

_zy :: R3 t => Lens' (t a) (V2 a) Source #

_xzy :: R3 t => Lens' (t a) (V3 a) Source #

_yxz :: R3 t => Lens' (t a) (V3 a) Source #

_yzx :: R3 t => Lens' (t a) (V3 a) Source #

_zxy :: R3 t => Lens' (t a) (V3 a) Source #

_zyx :: R3 t => Lens' (t a) (V3 a) Source #

ex :: R1 t => E t Source #

ey :: R2 t => E t Source #

ez :: R3 t => E t Source #