GPipe-Core-0.2.3.0: Typesafe functional GPU graphics programming
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.GPipe.Linear

Synopsis

Documentation

($*) :: Representable f => Covector r (Rep f) -> f r -> r infixr 0 #

newtype Covector r a #

Linear functionals from elements of an (infinite) free module to a scalar

Constructors

Covector 

Fields

Instances

Instances details
Monad (Covector r) 
Instance details

Defined in Linear.Covector

Methods

(>>=) :: Covector r a -> (a -> Covector r b) -> Covector r b #

(>>) :: Covector r a -> Covector r b -> Covector r b #

return :: a -> Covector r a #

Functor (Covector r) 
Instance details

Defined in Linear.Covector

Methods

fmap :: (a -> b) -> Covector r a -> Covector r b #

(<$) :: a -> Covector r b -> Covector r a #

Applicative (Covector r) 
Instance details

Defined in Linear.Covector

Methods

pure :: a -> Covector r a #

(<*>) :: Covector r (a -> b) -> Covector r a -> Covector r b #

liftA2 :: (a -> b -> c) -> Covector r a -> Covector r b -> Covector r c #

(*>) :: Covector r a -> Covector r b -> Covector r b #

(<*) :: Covector r a -> Covector r b -> Covector r a #

Num r => Alternative (Covector r) 
Instance details

Defined in Linear.Covector

Methods

empty :: Covector r a #

(<|>) :: Covector r a -> Covector r a -> Covector r a #

some :: Covector r a -> Covector r [a] #

many :: Covector r a -> Covector r [a] #

Num r => MonadPlus (Covector r) 
Instance details

Defined in Linear.Covector

Methods

mzero :: Covector r a #

mplus :: Covector r a -> Covector r a -> Covector r a #

Apply (Covector r) 
Instance details

Defined in Linear.Covector

Methods

(<.>) :: Covector r (a -> b) -> Covector r a -> Covector r b #

(.>) :: Covector r a -> Covector r b -> Covector r b #

(<.) :: Covector r a -> Covector r b -> Covector r a #

liftF2 :: (a -> b -> c) -> Covector r a -> Covector r b -> Covector r c #

Num r => Plus (Covector r) 
Instance details

Defined in Linear.Covector

Methods

zero :: Covector r a #

Num r => Alt (Covector r) 
Instance details

Defined in Linear.Covector

Methods

(<!>) :: Covector r a -> Covector r a -> Covector r a #

some :: Applicative (Covector r) => Covector r a -> Covector r [a] #

many :: Applicative (Covector r) => Covector r a -> Covector r [a] #

Bind (Covector r) 
Instance details

Defined in Linear.Covector

Methods

(>>-) :: Covector r a -> (a -> Covector r b) -> Covector r b #

join :: Covector r (Covector r a) -> Covector r a #

Coalgebra r m => Num (Covector r m) 
Instance details

Defined in Linear.Covector

Methods

(+) :: Covector r m -> Covector r m -> Covector r m #

(-) :: Covector r m -> Covector r m -> Covector r m #

(*) :: Covector r m -> Covector r m -> Covector r m #

negate :: Covector r m -> Covector r m #

abs :: Covector r m -> Covector r m #

signum :: Covector r m -> Covector r m #

fromInteger :: Integer -> Covector r m #

counitalRep :: (Representable f, Coalgebra r (Rep f)) => f r -> r #

comultRep :: (Representable f, Coalgebra r (Rep f)) => f r -> f (f r) #

unitalRep :: (Representable f, Algebra r (Rep f)) => r -> f r #

multRep :: (Representable f, Algebra r (Rep f)) => f (f r) -> f r #

class Num r => Algebra r m where #

An associative unital algebra over a ring

Methods

mult :: (m -> m -> r) -> m -> r #

unital :: r -> m -> r #

Instances

Instances details
Num r => Algebra r Void 
Instance details

Defined in Linear.Algebra

Methods

mult :: (Void -> Void -> r) -> Void -> r #

unital :: r -> Void -> r #

Num r => Algebra r () 
Instance details

Defined in Linear.Algebra

Methods

mult :: (() -> () -> r) -> () -> r #

unital :: r -> () -> r #

Num r => Algebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V0 -> E V0 -> r) -> E V0 -> r #

unital :: r -> E V0 -> r #

Num r => Algebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V1 -> E V1 -> r) -> E V1 -> r #

unital :: r -> E V1 -> r #

Num r => Algebra r (E Complex) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E Complex -> E Complex -> r) -> E Complex -> r #

unital :: r -> E Complex -> r #

(Num r, TrivialConjugate r) => Algebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E Quaternion -> E Quaternion -> r) -> E Quaternion -> r #

unital :: r -> E Quaternion -> r #

(Algebra r a, Algebra r b) => Algebra r (a, b) 
Instance details

Defined in Linear.Algebra

Methods

mult :: ((a, b) -> (a, b) -> r) -> (a, b) -> r #

unital :: r -> (a, b) -> r #

class Num r => Coalgebra r m where #

A coassociative counital coalgebra over a ring

Methods

comult :: (m -> r) -> m -> m -> r #

counital :: (m -> r) -> r #

Instances

Instances details
Num r => Coalgebra r Void 
Instance details

Defined in Linear.Algebra

Methods

comult :: (Void -> r) -> Void -> Void -> r #

counital :: (Void -> r) -> r #

Num r => Coalgebra r () 
Instance details

Defined in Linear.Algebra

Methods

comult :: (() -> r) -> () -> () -> r #

counital :: (() -> r) -> r #

Num r => Coalgebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V0 -> r) -> E V0 -> E V0 -> r #

counital :: (E V0 -> r) -> r #

Num r => Coalgebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V1 -> r) -> E V1 -> E V1 -> r #

counital :: (E V1 -> r) -> r #

Num r => Coalgebra r (E V2) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V2 -> r) -> E V2 -> E V2 -> r #

counital :: (E V2 -> r) -> r #

Num r => Coalgebra r (E V3) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V3 -> r) -> E V3 -> E V3 -> r #

counital :: (E V3 -> r) -> r #

Num r => Coalgebra r (E V4) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V4 -> r) -> E V4 -> E V4 -> r #

counital :: (E V4 -> r) -> r #

Num r => Coalgebra r (E Complex) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E Complex -> r) -> E Complex -> E Complex -> r #

counital :: (E Complex -> r) -> r #

(Num r, TrivialConjugate r) => Coalgebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E Quaternion -> r) -> E Quaternion -> E Quaternion -> r #

counital :: (E Quaternion -> r) -> r #

(Coalgebra r m, Coalgebra r n) => Coalgebra r (m, n) 
Instance details

Defined in Linear.Algebra

Methods

comult :: ((m, n) -> r) -> (m, n) -> (m, n) -> r #

counital :: ((m, n) -> r) -> r #

inverseOrtho #

Arguments

:: Fractional a 
=> a

Left

-> a

Right

-> a

Bottom

-> a

Top

-> a

Near

-> a

Far

-> M44 a 

Build an inverse orthographic perspective matrix from 6 clipping planes

ortho #

Arguments

:: Fractional a 
=> a

Left

-> a

Right

-> a

Bottom

-> a

Top

-> a

Near

-> a

Far

-> M44 a 

Build an orthographic perspective matrix from 6 clipping planes. This matrix takes the region delimited by these planes and maps it to normalized device coordinates between [-1,1]

This call is designed to mimic the parameters to the OpenGL glOrtho call, so it has a slightly strange convention: Notably: the near and far planes are negated.

Consequently:

ortho l r b t n f !* V4 l b (-n) 1 = V4 (-1) (-1) (-1) 1
ortho l r b t n f !* V4 r t (-f) 1 = V4 1 1 1 1

Examples:

>>> ortho 1 2 3 4 5 6 !* V4 1 3 (-5) 1
V4 (-1.0) (-1.0) (-1.0) 1.0
>>> ortho 1 2 3 4 5 6 !* V4 2 4 (-6) 1
V4 1.0 1.0 1.0 1.0

inverseInfinitePerspective #

Arguments

:: Floating a 
=> a

FOV (y direction, in radians)

-> a

Aspect Ratio

-> a

Near plane

-> M44 a 

infinitePerspective #

Arguments

:: Floating a 
=> a

FOV (y direction, in radians)

-> a

Aspect Ratio

-> a

Near plane

-> M44 a 

Build a matrix for a symmetric perspective-view frustum with a far plane at infinite

inverseFrustum #

Arguments

:: Floating a 
=> a

Left

-> a

Right

-> a

Bottom

-> a

Top

-> a

Near

-> a

Far

-> M44 a 

frustum #

Arguments

:: Floating a 
=> a

Left

-> a

Right

-> a

Bottom

-> a

Top

-> a

Near

-> a

Far

-> M44 a 

Build a perspective matrix per the classic glFrustum arguments.

inversePerspective #

Arguments

:: Floating a 
=> a

FOV (y direction, in radians)

-> a

Aspect ratio

-> a

Near plane

-> a

Far plane

-> M44 a 

Build an inverse perspective matrix

perspective #

Arguments

:: Floating a 
=> a

FOV (y direction, in radians)

-> a

Aspect ratio

-> a

Near plane

-> a

Far plane

-> M44 a 

Build a matrix for a symmetric perspective-view frustum

luDetFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> a #

Compute the determinant of a matrix using LU decomposition, using the vector's Finite instance to provide an index.

luDet :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Trace m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> a #

Compute the determinant of a matrix using LU decomposition.

luInvFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> m (m a) #

Invert a matrix with LU decomposition, using the vector's Finite instance to provide an index.

luInv :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Distributive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> m (m a) #

Invert a matrix with LU decomposition.

luSolveFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> m a -> m a #

Solve a linear system with LU decomposition, using the vector's Finite instance to provide an index.

luSolve :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> m a -> m a #

Solve a linear system with LU decomposition.

backwardSubFinite :: forall a m (n :: Nat). (Num a, Fractional a, Foldable m, n ~ Size m, KnownNat n, Additive m, Finite m) => m (m a) -> m a -> m a #

Solve a linear system with an upper-triangular matrix of coefficients with backwards substitution, using the vector's Finite instance to provide an index.

backwardSub :: (Num a, Fractional a, Foldable m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Ord i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a))) => m (m a) -> m a -> m a #

Solve a linear system with an upper-triangular matrix of coefficients with backwards substitution.

forwardSubFinite :: forall a m (n :: Nat). (Num a, Fractional a, Foldable m, n ~ Size m, KnownNat n, Additive m, Finite m) => m (m a) -> m a -> m a #

Solve a linear system with a lower-triangular matrix of coefficients with forwards substitution, using the vector's Finite instance to provide an index.

forwardSub :: (Num a, Fractional a, Foldable m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Ord i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a))) => m (m a) -> m a -> m a #

Solve a linear system with a lower-triangular matrix of coefficients with forwards substitution.

luFinite :: forall a m (n :: Nat). (Num a, Fractional a, Functor m, Finite m, n ~ Size m, KnownNat n, Num (m a)) => m (m a) -> (m (m a), m (m a)) #

Compute the (L, U) decomposition of a square matrix using Crout's algorithm, using the vector's Finite instance to provide an index.

lu :: (Num a, Fractional a, Foldable m, Traversable m, Applicative m, Additive m, Ixed (m a), Ixed (m (m a)), i ~ Index (m a), i ~ Index (m (m a)), Eq i, Integral i, a ~ IxValue (m a), m a ~ IxValue (m (m a)), Num (m a)) => m (m a) -> (m (m a), m (m a)) #

Compute the (L, U) decomposition of a square matrix using Crout's algorithm. The Index of the vectors must be Integral.

inv44 :: Fractional a => M44 a -> M44 a #

4x4 matrix inverse.

transpose :: (Distributive g, Functor f) => f (g a) -> g (f a) #

transpose is just an alias for distribute

transpose (V3 (V2 1 2) (V2 3 4) (V2 5 6))

V2 (V3 1 3 5) (V3 2 4 6)

inv33 :: Fractional a => M33 a -> M33 a #

3x3 matrix inverse.

>>> inv33 $ V3 (V3 1 2 4) (V3 4 2 2) (V3 1 1 1)
V3 (V3 0.0 0.5 (-1.0)) (V3 (-0.5) (-0.75) 3.5) (V3 0.5 0.25 (-1.5))

inv22 :: Fractional a => M22 a -> M22 a #

2x2 matrix inverse.

>>> inv22 $ V2 (V2 1 2) (V2 3 4)
V2 (V2 (-2.0) 1.0) (V2 1.5 (-0.5))

det44 :: Num a => M44 a -> a #

4x4 matrix determinant.

det33 :: Num a => M33 a -> a #

3x3 matrix determinant.

>>> det33 (V3 (V3 a b c) (V3 d e f) (V3 g h i))
a * (e * i - f * h) - d * (b * i - c * h) + g * (b * f - c * e)

det22 :: Num a => M22 a -> a #

2x2 matrix determinant.

>>> det22 (V2 (V2 a b) (V2 c d))
a * d - b * c

_m44 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R4 v) => Lens' (t (v a)) (M44 a) #

Extract a 4x4 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m43 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R3 v) => Lens' (t (v a)) (M43 a) #

Extract a 4x3 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m42 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R4 t, R2 v) => Lens' (t (v a)) (M42 a) #

Extract a 4x2 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m34 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R4 v) => Lens' (t (v a)) (M34 a) #

Extract a 3x4 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m33 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R3 v) => Lens' (t (v a)) (M33 a) #

Extract a 3x3 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m32 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R2 v) => Lens' (t (v a)) (M32 a) #

Extract a 3x2 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m24 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R4 v) => Lens' (t (v a)) (M24 a) #

Extract a 2x4 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m23 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R3 v) => Lens' (t (v a)) (M23 a) #

Extract a 2x3 matrix from a matrix of higher dimensions by dropping excess rows and columns.

_m22 :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R2 t, R2 v) => Lens' (t (v a)) (M22 a) #

Extract a 2x2 matrix from a matrix of higher dimensions by dropping excess rows and columns.

translation :: forall (t :: Type -> Type) (v :: Type -> Type) a. (Representable t, R3 t, R4 v) => Lens' (t (v a)) (V3 a) #

Extract the translation vector (first three entries of the last column) from a 3x4 or 4x4 matrix.

identity :: (Num a, Traversable t, Applicative t) => t (t a) #

The identity matrix for any dimension vector.

>>> identity :: M44 Int
V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1)
>>> identity :: V3 (V3 Int)
V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)

m33_to_m44 :: Num a => M33 a -> M44 a #

Convert a 3x3 matrix to a 4x4 matrix extending it with 0's in the new row and column.

m43_to_m44 :: Num a => M43 a -> M44 a #

Convert from a 4x3 matrix to a 4x4 matrix, extending it with the [ 0 0 0 1 ] column vector

mkTransformation :: Num a => Quaternion a -> V3 a -> M44 a #

Build a transformation matrix from a rotation expressed as a Quaternion and a translation vector.

mkTransformationMat :: Num a => M33 a -> V3 a -> M44 a #

Build a transformation matrix from a rotation matrix and a translation vector.

fromQuaternion :: Num a => Quaternion a -> M33 a #

Build a rotation matrix from a unit Quaternion.

adjoint :: (Functor m, Distributive n, Conjugate a) => m (n a) -> n (m a) #

Hermitian conjugate or conjugate transpose

>>> adjoint (V2 (V2 (1 :+ 2) (3 :+ 4)) (V2 (5 :+ 6) (7 :+ 8)))
V2 (V2 (1.0 :+ (-2.0)) (5.0 :+ (-6.0))) (V2 (3.0 :+ (-4.0)) (7.0 :+ (-8.0)))

(!!/) :: (Functor m, Functor r, Fractional a) => m (r a) -> a -> m (r a) infixl 7 #

Matrix-scalar division

(!!*) :: (Functor m, Functor r, Num a) => m (r a) -> a -> m (r a) infixl 7 #

Matrix-scalar product

>>> V2 (V2 1 2) (V2 3 4) !!* 5
V2 (V2 5 10) (V2 15 20)

(*!!) :: (Functor m, Functor r, Num a) => a -> m (r a) -> m (r a) infixl 7 #

Scalar-matrix product

>>> 5 *!! V2 (V2 1 2) (V2 3 4)
V2 (V2 5 10) (V2 15 20)

(*!) :: (Num a, Foldable t, Additive f, Additive t) => t a -> t (f a) -> f a infixl 7 #

Row vector * matrix

>>> V2 1 2 *! V2 (V3 3 4 5) (V3 6 7 8)
V3 15 18 21

(!*) :: (Functor m, Foldable r, Additive r, Num a) => m (r a) -> r a -> m a infixl 7 #

Matrix * column vector

>>> V2 (V3 1 2 3) (V3 4 5 6) !* V3 7 8 9
V2 50 122

(!-!) :: (Additive m, Additive n, Num a) => m (n a) -> m (n a) -> m (n a) infixl 6 #

Entry-wise matrix subtraction.

>>> V2 (V3 1 2 3) (V3 4 5 6) !-! V2 (V3 7 8 9) (V3 1 2 3)
V2 (V3 (-6) (-6) (-6)) (V3 3 3 3)

(!+!) :: (Additive m, Additive n, Num a) => m (n a) -> m (n a) -> m (n a) infixl 6 #

Entry-wise matrix addition.

>>> V2 (V3 1 2 3) (V3 4 5 6) !+! V2 (V3 7 8 9) (V3 1 2 3)
V2 (V3 8 10 12) (V3 5 7 9)

(!*!) :: (Functor m, Foldable t, Additive t, Additive n, Num a) => m (t a) -> t (n a) -> m (n a) infixl 7 #

Matrix product. This can compute any combination of sparse and dense multiplication.

>>> V2 (V3 1 2 3) (V3 4 5 6) !*! V3 (V2 1 2) (V2 3 4) (V2 4 5)
V2 (V2 19 25) (V2 43 58)
>>> V2 (fromList [(1,2)]) (fromList [(2,3)]) !*! fromList [(1,V3 0 0 1), (2, V3 0 0 5)]
V2 (V3 0 0 2) (V3 0 0 15)

column :: forall (f :: Type -> Type) a b s t. Representable f => LensLike (Context a b) s t a b -> Lens (f s) (f t) (f a) (f b) #

This is a generalization of inside to work over any corepresentable Functor.

column :: Representable f => Lens s t a b -> Lens (f s) (f t) (f a) (f b)

In practice it is used to access a column of a matrix.

>>> V2 (V3 1 2 3) (V3 4 5 6) ^._x
V3 1 2 3
>>> V2 (V3 1 2 3) (V3 4 5 6) ^.column _x
V2 1 4

type M22 a = V2 (V2 a) #

A 2x2 matrix with row-major representation

type M23 a = V2 (V3 a) #

A 2x3 matrix with row-major representation

type M24 a = V2 (V4 a) #

A 2x4 matrix with row-major representation

type M32 a = V3 (V2 a) #

A 3x2 matrix with row-major representation

type M33 a = V3 (V3 a) #

A 3x3 matrix with row-major representation

type M34 a = V3 (V4 a) #

A 3x4 matrix with row-major representation

type M42 a = V4 (V2 a) #

A 4x2 matrix with row-major representation

type M43 a = V4 (V3 a) #

A 4x3 matrix with row-major representation

type M44 a = V4 (V4 a) #

A 4x4 matrix with row-major representation

frobenius :: (Num a, Foldable f, Additive f, Additive g, Distributive g, Trace g) => f (g a) -> a #

Compute the Frobenius norm of a matrix.

class Functor m => Trace (m :: Type -> Type) where #

Minimal complete definition

Nothing

Methods

trace :: Num a => m (m a) -> a #

Compute the trace of a matrix

>>> trace (V2 (V2 a b) (V2 c d))
a + d

diagonal :: m (m a) -> m a #

Compute the diagonal of a matrix

>>> diagonal (V2 (V2 a b) (V2 c d))
V2 a d

Instances

Instances details
Trace Complex 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => Complex (Complex a) -> a #

diagonal :: Complex (Complex a) -> Complex a #

Trace IntMap 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => IntMap (IntMap a) -> a #

diagonal :: IntMap (IntMap a) -> IntMap a #

Trace Plucker 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => Plucker (Plucker a) -> a #

diagonal :: Plucker (Plucker a) -> Plucker a #

Trace Quaternion 
Instance details

Defined in Linear.Trace

Trace V0 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V0 (V0 a) -> a #

diagonal :: V0 (V0 a) -> V0 a #

Trace V4 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V4 (V4 a) -> a #

diagonal :: V4 (V4 a) -> V4 a #

Trace V3 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V3 (V3 a) -> a #

diagonal :: V3 (V3 a) -> V3 a #

Trace V2 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V2 (V2 a) -> a #

diagonal :: V2 (V2 a) -> V2 a #

Trace V1 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V1 (V1 a) -> a #

diagonal :: V1 (V1 a) -> V1 a #

Ord k => Trace (Map k) 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => Map k (Map k a) -> a #

diagonal :: Map k (Map k a) -> Map k a #

(Eq k, Hashable k) => Trace (HashMap k) 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => HashMap k (HashMap k a) -> a #

diagonal :: HashMap k (HashMap k a) -> HashMap k a #

Dim n => Trace (V n) 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V n (V n a) -> a #

diagonal :: V n (V n a) -> V n a #

(Trace f, Trace g) => Trace (Product f g) 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => Product f g (Product f g a) -> a #

diagonal :: Product f g (Product f g a) -> Product f g a #

(Distributive g, Trace g, Trace f) => Trace (Compose g f) 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => Compose g f (Compose g f a) -> a #

diagonal :: Compose g f (Compose g f a) -> Compose g f a #

axisAngle :: (Epsilon a, Floating a) => V3 a -> a -> Quaternion a #

axisAngle axis theta builds a Quaternion representing a rotation of theta radians about axis.

rotate :: (Conjugate a, RealFloat a) => Quaternion a -> V3 a -> V3 a #

Apply a rotation to a vector.

slerp :: RealFloat a => Quaternion a -> Quaternion a -> a -> Quaternion a #

Spherical linear interpolation between two quaternions.

atanhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

atanh with a specified branch cut.

acoshq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

acosh with a specified branch cut.

asinhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

asinh with a specified branch cut.

atanq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

atan with a specified branch cut.

acosq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

acos with a specified branch cut.

asinq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a #

asin with a specified branch cut.

pow :: RealFloat a => Quaternion a -> a -> Quaternion a #

raise a Quaternion to a scalar power

absi :: Floating a => Quaternion a -> a #

norm of the imaginary component

ek :: forall (t :: Type -> Type). Hamiltonian t => E t #

ej :: forall (t :: Type -> Type). Hamiltonian t => E t #

ei :: forall (t :: Type -> Type). Complicated t => E t #

ee :: forall (t :: Type -> Type). Complicated t => E t #

data Quaternion a #

Quaternions

Constructors

Quaternion !a !(V3 a) 

Instances

Instances details
Monad Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

(>>=) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

(>>) :: Quaternion a -> Quaternion b -> Quaternion b #

return :: a -> Quaternion a #

Functor Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

fmap :: (a -> b) -> Quaternion a -> Quaternion b #

(<$) :: a -> Quaternion b -> Quaternion a #

MonadFix Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

mfix :: (a -> Quaternion a) -> Quaternion a #

Applicative Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

pure :: a -> Quaternion a #

(<*>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

liftA2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

(*>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<*) :: Quaternion a -> Quaternion b -> Quaternion a #

Foldable Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

fold :: Monoid m => Quaternion m -> m #

foldMap :: Monoid m => (a -> m) -> Quaternion a -> m #

foldMap' :: Monoid m => (a -> m) -> Quaternion a -> m #

foldr :: (a -> b -> b) -> b -> Quaternion a -> b #

foldr' :: (a -> b -> b) -> b -> Quaternion a -> b #

foldl :: (b -> a -> b) -> b -> Quaternion a -> b #

foldl' :: (b -> a -> b) -> b -> Quaternion a -> b #

foldr1 :: (a -> a -> a) -> Quaternion a -> a #

foldl1 :: (a -> a -> a) -> Quaternion a -> a #

toList :: Quaternion a -> [a] #

null :: Quaternion a -> Bool #

length :: Quaternion a -> Int #

elem :: Eq a => a -> Quaternion a -> Bool #

maximum :: Ord a => Quaternion a -> a #

minimum :: Ord a => Quaternion a -> a #

sum :: Num a => Quaternion a -> a #

product :: Num a => Quaternion a -> a #

Traversable Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

traverse :: Applicative f => (a -> f b) -> Quaternion a -> f (Quaternion b) #

sequenceA :: Applicative f => Quaternion (f a) -> f (Quaternion a) #

mapM :: Monad m => (a -> m b) -> Quaternion a -> m (Quaternion b) #

sequence :: Monad m => Quaternion (m a) -> m (Quaternion a) #

Distributive Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

distribute :: Functor f => f (Quaternion a) -> Quaternion (f a) #

collect :: Functor f => (a -> Quaternion b) -> f a -> Quaternion (f b) #

distributeM :: Monad m => m (Quaternion a) -> Quaternion (m a) #

collectM :: Monad m => (a -> Quaternion b) -> m a -> Quaternion (m b) #

Representable Quaternion 
Instance details

Defined in Linear.Quaternion

Associated Types

type Rep Quaternion #

Methods

tabulate :: (Rep Quaternion -> a) -> Quaternion a #

index :: Quaternion a -> Rep Quaternion -> a #

Eq1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

liftEq :: (a -> b -> Bool) -> Quaternion a -> Quaternion b -> Bool #

Ord1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

liftCompare :: (a -> b -> Ordering) -> Quaternion a -> Quaternion b -> Ordering #

Read1 Quaternion 
Instance details

Defined in Linear.Quaternion

Show1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Quaternion a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Quaternion a] -> ShowS #

MonadZip Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

mzip :: Quaternion a -> Quaternion b -> Quaternion (a, b) #

mzipWith :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

munzip :: Quaternion (a, b) -> (Quaternion a, Quaternion b) #

Serial1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

serializeWith :: MonadPut m => (a -> m ()) -> Quaternion a -> m () #

deserializeWith :: MonadGet m => m a -> m (Quaternion a) #

Hashable1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Quaternion a -> Int #

Apply Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

(<.>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

(.>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<.) :: Quaternion a -> Quaternion b -> Quaternion a #

liftF2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

Affine Quaternion 
Instance details

Defined in Linear.Affine

Associated Types

type Diff Quaternion :: Type -> Type #

Trace Quaternion 
Instance details

Defined in Linear.Trace

Complicated Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_e :: Lens' (Quaternion a) a #

_i :: Lens' (Quaternion a) a #

Hamiltonian Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_j :: Lens' (Quaternion a) a #

_k :: Lens' (Quaternion a) a #

_ijk :: Lens' (Quaternion a) (V3 a) #

R4 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_w :: Lens' (Quaternion a) a #

_xyzw :: Lens' (Quaternion a) (V4 a) #

R3 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_z :: Lens' (Quaternion a) a #

_xyz :: Lens' (Quaternion a) (V3 a) #

R2 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_y :: Lens' (Quaternion a) a #

_xy :: Lens' (Quaternion a) (V2 a) #

R1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_x :: Lens' (Quaternion a) a #

Finite Quaternion 
Instance details

Defined in Linear.Quaternion

Associated Types

type Size Quaternion :: Nat #

Methods

toV :: Quaternion a -> V (Size Quaternion) a #

fromV :: V (Size Quaternion) a -> Quaternion a #

Metric Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

dot :: Num a => Quaternion a -> Quaternion a -> a #

quadrance :: Num a => Quaternion a -> a #

qd :: Num a => Quaternion a -> Quaternion a -> a #

distance :: Floating a => Quaternion a -> Quaternion a -> a #

norm :: Floating a => Quaternion a -> a #

signorm :: Floating a => Quaternion a -> Quaternion a #

Additive Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

zero :: Num a => Quaternion a #

(^+^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

(^-^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

lerp :: Num a => a -> Quaternion a -> Quaternion a -> Quaternion a #

liftU2 :: (a -> a -> a) -> Quaternion a -> Quaternion a -> Quaternion a #

liftI2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

Bind Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

(>>-) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

join :: Quaternion (Quaternion a) -> Quaternion a #

Lift a => Lift (Quaternion a :: Type) 
Instance details

Defined in Linear.Quaternion

Methods

lift :: Quaternion a -> Q Exp #

liftTyped :: Quaternion a -> Q (TExp (Quaternion a)) #

Unbox a => Vector Vector (Quaternion a) 
Instance details

Defined in Linear.Quaternion

(Num r, TrivialConjugate r) => Algebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E Quaternion -> E Quaternion -> r) -> E Quaternion -> r #

unital :: r -> E Quaternion -> r #

(Num r, TrivialConjugate r) => Coalgebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E Quaternion -> r) -> E Quaternion -> E Quaternion -> r #

counital :: (E Quaternion -> r) -> r #

Unbox a => MVector MVector (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Eq a => Eq (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

(==) :: Quaternion a -> Quaternion a -> Bool #

(/=) :: Quaternion a -> Quaternion a -> Bool #

RealFloat a => Floating (Quaternion a) 
Instance details

Defined in Linear.Quaternion

RealFloat a => Fractional (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Data a => Data (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quaternion a -> c (Quaternion a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Quaternion a) #

toConstr :: Quaternion a -> Constr #

dataTypeOf :: Quaternion a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Quaternion a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Quaternion a)) #

gmapT :: (forall b. Data b => b -> b) -> Quaternion a -> Quaternion a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Quaternion a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Quaternion a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

RealFloat a => Num (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Ord a => Ord (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Read a => Read (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Show a => Show (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Ix a => Ix (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Generic (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Associated Types

type Rep (Quaternion a) :: Type -> Type #

Methods

from :: Quaternion a -> Rep (Quaternion a) x #

to :: Rep (Quaternion a) x -> Quaternion a #

Semigroup a => Semigroup (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Monoid a => Monoid (Quaternion a) 
Instance details

Defined in Linear.Quaternion

IfB a => IfB (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (Quaternion a) => bool -> Quaternion a -> Quaternion a -> Quaternion a #

EqB a => EqB (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (Quaternion a) => Quaternion a -> Quaternion a -> bool #

(/=*) :: bool ~ BooleanOf (Quaternion a) => Quaternion a -> Quaternion a -> bool #

Storable a => Storable (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

sizeOf :: Quaternion a -> Int #

alignment :: Quaternion a -> Int #

peekElemOff :: Ptr (Quaternion a) -> Int -> IO (Quaternion a) #

pokeElemOff :: Ptr (Quaternion a) -> Int -> Quaternion a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Quaternion a) #

pokeByteOff :: Ptr b -> Int -> Quaternion a -> IO () #

peek :: Ptr (Quaternion a) -> IO (Quaternion a) #

poke :: Ptr (Quaternion a) -> Quaternion a -> IO () #

Binary a => Binary (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

put :: Quaternion a -> Put #

get :: Get (Quaternion a) #

putList :: [Quaternion a] -> Put #

Serial a => Serial (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

serialize :: MonadPut m => Quaternion a -> m () #

deserialize :: MonadGet m => m (Quaternion a) #

Serialize a => Serialize (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

put :: Putter (Quaternion a) #

get :: Get (Quaternion a) #

NFData a => NFData (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

rnf :: Quaternion a -> () #

Hashable a => Hashable (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

hashWithSalt :: Int -> Quaternion a -> Int #

hash :: Quaternion a -> Int #

Unbox a => Unbox (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Ixed (Quaternion a) 
Instance details

Defined in Linear.Quaternion

(RealFloat a, Epsilon a) => Epsilon (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

nearZero :: Quaternion a -> Bool #

(Conjugate a, RealFloat a) => Conjugate (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

conjugate :: Quaternion a -> Quaternion a #

Random a => Random (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

randomR :: RandomGen g => (Quaternion a, Quaternion a) -> g -> (Quaternion a, g) #

random :: RandomGen g => g -> (Quaternion a, g) #

randomRs :: RandomGen g => (Quaternion a, Quaternion a) -> g -> [Quaternion a] #

randoms :: RandomGen g => g -> [Quaternion a] #

BufferFormat a => BufferFormat (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (Quaternion a) Source #

UniformInput a => UniformInput (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (Quaternion a) x Source #

VertexInput a => VertexInput (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (Quaternion a) Source #

FragmentInput a => FragmentInput (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (Quaternion a) Source #

FragmentCreator a => FragmentCreator (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 Quaternion 
Instance details

Defined in Linear.Quaternion

Associated Types

type Rep1 Quaternion :: k -> Type #

Methods

from1 :: forall (a :: k). Quaternion a -> Rep1 Quaternion a #

to1 :: forall (a :: k). Rep1 Quaternion a -> Quaternion a #

FunctorWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

imap :: (E Quaternion -> a -> b) -> Quaternion a -> Quaternion b #

FoldableWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

ifoldMap :: Monoid m => (E Quaternion -> a -> m) -> Quaternion a -> m #

ifoldMap' :: Monoid m => (E Quaternion -> a -> m) -> Quaternion a -> m #

ifoldr :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

ifoldr' :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl' :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

TraversableWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

itraverse :: Applicative f => (E Quaternion -> a -> f b) -> Quaternion a -> f (Quaternion b) #

Each (Quaternion a) (Quaternion b) a b 
Instance details

Defined in Linear.Quaternion

Methods

each :: Traversal (Quaternion a) (Quaternion b) a b #

Field1 (Quaternion a) (Quaternion a) a a 
Instance details

Defined in Linear.Quaternion

Methods

_1 :: Lens (Quaternion a) (Quaternion a) a a #

Field2 (Quaternion a) (Quaternion a) a a 
Instance details

Defined in Linear.Quaternion

Methods

_2 :: Lens (Quaternion a) (Quaternion a) a a #

Field3 (Quaternion a) (Quaternion a) a a 
Instance details

Defined in Linear.Quaternion

Methods

_3 :: Lens (Quaternion a) (Quaternion a) a a #

Field4 (Quaternion a) (Quaternion a) a a 
Instance details

Defined in Linear.Quaternion

Methods

_4 :: Lens (Quaternion a) (Quaternion a) a a #

type Rep Quaternion 
Instance details

Defined in Linear.Quaternion

type Diff Quaternion 
Instance details

Defined in Linear.Affine

type Size Quaternion 
Instance details

Defined in Linear.Quaternion

type Size Quaternion = 4
data MVector s (Quaternion a) 
Instance details

Defined in Linear.Quaternion

type Rep (Quaternion a) 
Instance details

Defined in Linear.Quaternion

type Rep (Quaternion a) = D1 ('MetaData "Quaternion" "Linear.Quaternion" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "Quaternion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 (V3 a))))
type BooleanOf (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

data Vector (Quaternion a) 
Instance details

Defined in Linear.Quaternion

type Index (Quaternion a) 
Instance details

Defined in Linear.Quaternion

type IxValue (Quaternion a) 
Instance details

Defined in Linear.Quaternion

type IxValue (Quaternion a) = a
type HostFormat (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type VertexFormat (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (Quaternion a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 Quaternion 
Instance details

Defined in Linear.Quaternion

type Rep1 Quaternion = D1 ('MetaData "Quaternion" "Linear.Quaternion" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "Quaternion" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec1 V3)))
type UniformFormat (Quaternion a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

class Complicated (t :: Type -> Type) where #

A vector space that includes the basis elements _e and _i

Methods

_e :: Lens' (t a) a #

_i :: Lens' (t a) a #

Instances

Instances details
Complicated Complex 
Instance details

Defined in Linear.Quaternion

Methods

_e :: Lens' (Complex a) a #

_i :: Lens' (Complex a) a #

Complicated Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_e :: Lens' (Quaternion a) a #

_i :: Lens' (Quaternion a) a #

class Complicated t => Hamiltonian (t :: Type -> Type) where #

A vector space that includes the basis elements _e, _i, _j and _k

Methods

_j :: Lens' (t a) a #

_k :: Lens' (t a) a #

_ijk :: Lens' (t a) (V3 a) #

Instances

Instances details
Hamiltonian Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_j :: Lens' (Quaternion a) a #

_k :: Lens' (Quaternion a) a #

_ijk :: Lens' (Quaternion a) (V3 a) #

data V0 a #

A 0-dimensional vector

>>> pure 1 :: V0 Int
V0
>>> V0 + V0
V0

Constructors

V0 

Instances

Instances details
Monad V0 
Instance details

Defined in Linear.V0

Methods

(>>=) :: V0 a -> (a -> V0 b) -> V0 b #

(>>) :: V0 a -> V0 b -> V0 b #

return :: a -> V0 a #

Functor V0 
Instance details

Defined in Linear.V0

Methods

fmap :: (a -> b) -> V0 a -> V0 b #

(<$) :: a -> V0 b -> V0 a #

MonadFix V0 
Instance details

Defined in Linear.V0

Methods

mfix :: (a -> V0 a) -> V0 a #

Applicative V0 
Instance details

Defined in Linear.V0

Methods

pure :: a -> V0 a #

(<*>) :: V0 (a -> b) -> V0 a -> V0 b #

liftA2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

(*>) :: V0 a -> V0 b -> V0 b #

(<*) :: V0 a -> V0 b -> V0 a #

Foldable V0 
Instance details

Defined in Linear.V0

Methods

fold :: Monoid m => V0 m -> m #

foldMap :: Monoid m => (a -> m) -> V0 a -> m #

foldMap' :: Monoid m => (a -> m) -> V0 a -> m #

foldr :: (a -> b -> b) -> b -> V0 a -> b #

foldr' :: (a -> b -> b) -> b -> V0 a -> b #

foldl :: (b -> a -> b) -> b -> V0 a -> b #

foldl' :: (b -> a -> b) -> b -> V0 a -> b #

foldr1 :: (a -> a -> a) -> V0 a -> a #

foldl1 :: (a -> a -> a) -> V0 a -> a #

toList :: V0 a -> [a] #

null :: V0 a -> Bool #

length :: V0 a -> Int #

elem :: Eq a => a -> V0 a -> Bool #

maximum :: Ord a => V0 a -> a #

minimum :: Ord a => V0 a -> a #

sum :: Num a => V0 a -> a #

product :: Num a => V0 a -> a #

Traversable V0 
Instance details

Defined in Linear.V0

Methods

traverse :: Applicative f => (a -> f b) -> V0 a -> f (V0 b) #

sequenceA :: Applicative f => V0 (f a) -> f (V0 a) #

mapM :: Monad m => (a -> m b) -> V0 a -> m (V0 b) #

sequence :: Monad m => V0 (m a) -> m (V0 a) #

Distributive V0 
Instance details

Defined in Linear.V0

Methods

distribute :: Functor f => f (V0 a) -> V0 (f a) #

collect :: Functor f => (a -> V0 b) -> f a -> V0 (f b) #

distributeM :: Monad m => m (V0 a) -> V0 (m a) #

collectM :: Monad m => (a -> V0 b) -> m a -> V0 (m b) #

Representable V0 
Instance details

Defined in Linear.V0

Associated Types

type Rep V0 #

Methods

tabulate :: (Rep V0 -> a) -> V0 a #

index :: V0 a -> Rep V0 -> a #

Eq1 V0 
Instance details

Defined in Linear.V0

Methods

liftEq :: (a -> b -> Bool) -> V0 a -> V0 b -> Bool #

Ord1 V0 
Instance details

Defined in Linear.V0

Methods

liftCompare :: (a -> b -> Ordering) -> V0 a -> V0 b -> Ordering #

Read1 V0 
Instance details

Defined in Linear.V0

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V0 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V0 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V0 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V0 a] #

Show1 V0 
Instance details

Defined in Linear.V0

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V0 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V0 a] -> ShowS #

MonadZip V0 
Instance details

Defined in Linear.V0

Methods

mzip :: V0 a -> V0 b -> V0 (a, b) #

mzipWith :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

munzip :: V0 (a, b) -> (V0 a, V0 b) #

Serial1 V0 
Instance details

Defined in Linear.V0

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V0 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V0 a) #

Hashable1 V0 
Instance details

Defined in Linear.V0

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> V0 a -> Int #

Apply V0 
Instance details

Defined in Linear.V0

Methods

(<.>) :: V0 (a -> b) -> V0 a -> V0 b #

(.>) :: V0 a -> V0 b -> V0 b #

(<.) :: V0 a -> V0 b -> V0 a #

liftF2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

Affine V0 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V0 :: Type -> Type #

Methods

(.-.) :: Num a => V0 a -> V0 a -> Diff V0 a #

(.+^) :: Num a => V0 a -> Diff V0 a -> V0 a #

(.-^) :: Num a => V0 a -> Diff V0 a -> V0 a #

Trace V0 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V0 (V0 a) -> a #

diagonal :: V0 (V0 a) -> V0 a #

Finite V0 
Instance details

Defined in Linear.V0

Associated Types

type Size V0 :: Nat #

Methods

toV :: V0 a -> V (Size V0) a #

fromV :: V (Size V0) a -> V0 a #

Metric V0 
Instance details

Defined in Linear.V0

Methods

dot :: Num a => V0 a -> V0 a -> a #

quadrance :: Num a => V0 a -> a #

qd :: Num a => V0 a -> V0 a -> a #

distance :: Floating a => V0 a -> V0 a -> a #

norm :: Floating a => V0 a -> a #

signorm :: Floating a => V0 a -> V0 a #

Additive V0 
Instance details

Defined in Linear.V0

Methods

zero :: Num a => V0 a #

(^+^) :: Num a => V0 a -> V0 a -> V0 a #

(^-^) :: Num a => V0 a -> V0 a -> V0 a #

lerp :: Num a => a -> V0 a -> V0 a -> V0 a #

liftU2 :: (a -> a -> a) -> V0 a -> V0 a -> V0 a #

liftI2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

Bind V0 
Instance details

Defined in Linear.V0

Methods

(>>-) :: V0 a -> (a -> V0 b) -> V0 b #

join :: V0 (V0 a) -> V0 a #

Lift (V0 a :: Type) 
Instance details

Defined in Linear.V0

Methods

lift :: V0 a -> Q Exp #

liftTyped :: V0 a -> Q (TExp (V0 a)) #

Vector Vector (V0 a) 
Instance details

Defined in Linear.V0

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V0 a) -> m (Vector (V0 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V0 a) -> m (Mutable Vector (PrimState m) (V0 a)) #

basicLength :: Vector (V0 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V0 a) -> Vector (V0 a) #

basicUnsafeIndexM :: Monad m => Vector (V0 a) -> Int -> m (V0 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V0 a) -> Vector (V0 a) -> m () #

elemseq :: Vector (V0 a) -> V0 a -> b -> b #

Num r => Algebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V0 -> E V0 -> r) -> E V0 -> r #

unital :: r -> E V0 -> r #

Num r => Coalgebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V0 -> r) -> E V0 -> E V0 -> r #

counital :: (E V0 -> r) -> r #

MVector MVector (V0 a) 
Instance details

Defined in Linear.V0

Methods

basicLength :: MVector s (V0 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V0 a) -> MVector s (V0 a) #

basicOverlaps :: MVector s (V0 a) -> MVector s (V0 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V0 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V0 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V0 a -> m (MVector (PrimState m) (V0 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> m (V0 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> V0 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V0 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V0 a) -> V0 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V0 a) -> MVector (PrimState m) (V0 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V0 a) -> MVector (PrimState m) (V0 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V0 a) -> Int -> m (MVector (PrimState m) (V0 a)) #

Bounded (V0 a) 
Instance details

Defined in Linear.V0

Methods

minBound :: V0 a #

maxBound :: V0 a #

Enum (V0 a) 
Instance details

Defined in Linear.V0

Methods

succ :: V0 a -> V0 a #

pred :: V0 a -> V0 a #

toEnum :: Int -> V0 a #

fromEnum :: V0 a -> Int #

enumFrom :: V0 a -> [V0 a] #

enumFromThen :: V0 a -> V0 a -> [V0 a] #

enumFromTo :: V0 a -> V0 a -> [V0 a] #

enumFromThenTo :: V0 a -> V0 a -> V0 a -> [V0 a] #

Eq (V0 a) 
Instance details

Defined in Linear.V0

Methods

(==) :: V0 a -> V0 a -> Bool #

(/=) :: V0 a -> V0 a -> Bool #

Floating (V0 a) 
Instance details

Defined in Linear.V0

Methods

pi :: V0 a #

exp :: V0 a -> V0 a #

log :: V0 a -> V0 a #

sqrt :: V0 a -> V0 a #

(**) :: V0 a -> V0 a -> V0 a #

logBase :: V0 a -> V0 a -> V0 a #

sin :: V0 a -> V0 a #

cos :: V0 a -> V0 a #

tan :: V0 a -> V0 a #

asin :: V0 a -> V0 a #

acos :: V0 a -> V0 a #

atan :: V0 a -> V0 a #

sinh :: V0 a -> V0 a #

cosh :: V0 a -> V0 a #

tanh :: V0 a -> V0 a #

asinh :: V0 a -> V0 a #

acosh :: V0 a -> V0 a #

atanh :: V0 a -> V0 a #

log1p :: V0 a -> V0 a #

expm1 :: V0 a -> V0 a #

log1pexp :: V0 a -> V0 a #

log1mexp :: V0 a -> V0 a #

Fractional (V0 a) 
Instance details

Defined in Linear.V0

Methods

(/) :: V0 a -> V0 a -> V0 a #

recip :: V0 a -> V0 a #

fromRational :: Rational -> V0 a #

Data a => Data (V0 a) 
Instance details

Defined in Linear.V0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V0 a -> c (V0 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V0 a) #

toConstr :: V0 a -> Constr #

dataTypeOf :: V0 a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V0 a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V0 a)) #

gmapT :: (forall b. Data b => b -> b) -> V0 a -> V0 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V0 a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V0 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V0 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V0 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V0 a -> m (V0 a) #

Num (V0 a) 
Instance details

Defined in Linear.V0

Methods

(+) :: V0 a -> V0 a -> V0 a #

(-) :: V0 a -> V0 a -> V0 a #

(*) :: V0 a -> V0 a -> V0 a #

negate :: V0 a -> V0 a #

abs :: V0 a -> V0 a #

signum :: V0 a -> V0 a #

fromInteger :: Integer -> V0 a #

Ord (V0 a) 
Instance details

Defined in Linear.V0

Methods

compare :: V0 a -> V0 a -> Ordering #

(<) :: V0 a -> V0 a -> Bool #

(<=) :: V0 a -> V0 a -> Bool #

(>) :: V0 a -> V0 a -> Bool #

(>=) :: V0 a -> V0 a -> Bool #

max :: V0 a -> V0 a -> V0 a #

min :: V0 a -> V0 a -> V0 a #

Read (V0 a) 
Instance details

Defined in Linear.V0

Show (V0 a) 
Instance details

Defined in Linear.V0

Methods

showsPrec :: Int -> V0 a -> ShowS #

show :: V0 a -> String #

showList :: [V0 a] -> ShowS #

Ix (V0 a) 
Instance details

Defined in Linear.V0

Methods

range :: (V0 a, V0 a) -> [V0 a] #

index :: (V0 a, V0 a) -> V0 a -> Int #

unsafeIndex :: (V0 a, V0 a) -> V0 a -> Int #

inRange :: (V0 a, V0 a) -> V0 a -> Bool #

rangeSize :: (V0 a, V0 a) -> Int #

unsafeRangeSize :: (V0 a, V0 a) -> Int #

Generic (V0 a) 
Instance details

Defined in Linear.V0

Associated Types

type Rep (V0 a) :: Type -> Type #

Methods

from :: V0 a -> Rep (V0 a) x #

to :: Rep (V0 a) x -> V0 a #

Semigroup (V0 a) 
Instance details

Defined in Linear.V0

Methods

(<>) :: V0 a -> V0 a -> V0 a #

sconcat :: NonEmpty (V0 a) -> V0 a #

stimes :: Integral b => b -> V0 a -> V0 a #

Monoid (V0 a) 
Instance details

Defined in Linear.V0

Methods

mempty :: V0 a #

mappend :: V0 a -> V0 a -> V0 a #

mconcat :: [V0 a] -> V0 a #

IfB a => IfB (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (V0 a) => bool -> V0 a -> V0 a -> V0 a #

EqB a => EqB (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (V0 a) => V0 a -> V0 a -> bool #

(/=*) :: bool ~ BooleanOf (V0 a) => V0 a -> V0 a -> bool #

Storable (V0 a) 
Instance details

Defined in Linear.V0

Methods

sizeOf :: V0 a -> Int #

alignment :: V0 a -> Int #

peekElemOff :: Ptr (V0 a) -> Int -> IO (V0 a) #

pokeElemOff :: Ptr (V0 a) -> Int -> V0 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V0 a) #

pokeByteOff :: Ptr b -> Int -> V0 a -> IO () #

peek :: Ptr (V0 a) -> IO (V0 a) #

poke :: Ptr (V0 a) -> V0 a -> IO () #

Binary (V0 a) 
Instance details

Defined in Linear.V0

Methods

put :: V0 a -> Put #

get :: Get (V0 a) #

putList :: [V0 a] -> Put #

Serial (V0 a) 
Instance details

Defined in Linear.V0

Methods

serialize :: MonadPut m => V0 a -> m () #

deserialize :: MonadGet m => m (V0 a) #

Serialize (V0 a) 
Instance details

Defined in Linear.V0

Methods

put :: Putter (V0 a) #

get :: Get (V0 a) #

NFData (V0 a) 
Instance details

Defined in Linear.V0

Methods

rnf :: V0 a -> () #

Hashable (V0 a) 
Instance details

Defined in Linear.V0

Methods

hashWithSalt :: Int -> V0 a -> Int #

hash :: V0 a -> Int #

Unbox (V0 a) 
Instance details

Defined in Linear.V0

Ixed (V0 a) 
Instance details

Defined in Linear.V0

Methods

ix :: Index (V0 a) -> Traversal' (V0 a) (IxValue (V0 a)) #

Epsilon (V0 a) 
Instance details

Defined in Linear.V0

Methods

nearZero :: V0 a -> Bool #

Random (V0 a) 
Instance details

Defined in Linear.V0

Methods

randomR :: RandomGen g => (V0 a, V0 a) -> g -> (V0 a, g) #

random :: RandomGen g => g -> (V0 a, g) #

randomRs :: RandomGen g => (V0 a, V0 a) -> g -> [V0 a] #

randoms :: RandomGen g => g -> [V0 a] #

Real' a => Real' (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

rsqrt :: V0 a -> V0 a Source #

exp2 :: V0 a -> V0 a Source #

log2 :: V0 a -> V0 a Source #

floor' :: V0 a -> V0 a Source #

ceiling' :: V0 a -> V0 a Source #

fract' :: V0 a -> V0 a Source #

mod'' :: V0 a -> V0 a -> V0 a Source #

mix :: V0 a -> V0 a -> V0 a -> V0 a Source #

atan2' :: V0 a -> V0 a -> V0 a Source #

Integral' a => Integral' (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

div' :: V0 a -> V0 a -> V0 a Source #

mod' :: V0 a -> V0 a -> V0 a Source #

BufferFormat a => BufferFormat (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (V0 a) Source #

UniformInput a => UniformInput (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (V0 a) x Source #

Methods

toUniform :: ToUniform x (V0 a) (UniformFormat (V0 a) x) Source #

VertexInput a => VertexInput (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (V0 a) Source #

Methods

toVertex :: ToVertex (V0 a) (VertexFormat (V0 a)) Source #

FragmentInput a => FragmentInput (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (V0 a) Source #

FragmentCreator a => FragmentCreator (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

GeometryExplosive a => GeometryExplosive (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 V0 
Instance details

Defined in Linear.V0

Associated Types

type Rep1 V0 :: k -> Type #

Methods

from1 :: forall (a :: k). V0 a -> Rep1 V0 a #

to1 :: forall (a :: k). Rep1 V0 a -> V0 a #

FunctorWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

imap :: (E V0 -> a -> b) -> V0 a -> V0 b #

FoldableWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

ifoldMap :: Monoid m => (E V0 -> a -> m) -> V0 a -> m #

ifoldMap' :: Monoid m => (E V0 -> a -> m) -> V0 a -> m #

ifoldr :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

ifoldr' :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl' :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

TraversableWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

itraverse :: Applicative f => (E V0 -> a -> f b) -> V0 a -> f (V0 b) #

ShaderType a x => ShaderType (V0 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Associated Types

type ShaderBaseType (V0 a) Source #

Methods

toBase :: x -> V0 a -> ShaderBase (ShaderBaseType (V0 a)) x Source #

fromBase :: x -> ShaderBase (ShaderBaseType (V0 a)) x -> V0 a Source #

Each (V0 a) (V0 b) a b 
Instance details

Defined in Linear.V0

Methods

each :: Traversal (V0 a) (V0 b) a b #

type Rep V0 
Instance details

Defined in Linear.V0

type Rep V0 = E V0
type Diff V0 
Instance details

Defined in Linear.Affine

type Diff V0 = V0
type Size V0 
Instance details

Defined in Linear.V0

type Size V0 = 0
newtype MVector s (V0 a) 
Instance details

Defined in Linear.V0

newtype MVector s (V0 a) = MV_V0 Int
type Rep (V0 a) 
Instance details

Defined in Linear.V0

type Rep (V0 a) = D1 ('MetaData "V0" "Linear.V0" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "V0" 'PrefixI 'False) (U1 :: Type -> Type))
type BooleanOf (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

type BooleanOf (V0 a) = BooleanOf a
newtype Vector (V0 a) 
Instance details

Defined in Linear.V0

newtype Vector (V0 a) = V_V0 Int
type Index (V0 a) 
Instance details

Defined in Linear.V0

type Index (V0 a) = E V0
type IxValue (V0 a) 
Instance details

Defined in Linear.V0

type IxValue (V0 a) = a
type ShaderBaseType (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

type ShaderBaseType (V0 a) = ()
type HostFormat (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type HostFormat (V0 a) = V0 (HostFormat a)
type VertexFormat (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (V0 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 V0 
Instance details

Defined in Linear.V0

type Rep1 V0 = D1 ('MetaData "V0" "Linear.V0" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "V0" 'PrefixI 'False) (U1 :: Type -> Type))
type UniformFormat (V0 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

type UniformFormat (V0 a) x = V0 (UniformFormat a x)

normalizePoint :: Fractional a => V4 a -> V3 a #

Convert 4-dimensional projective coordinates to a 3-dimensional point. This operation may be denoted, euclidean [x:y:z:w] = (x/w, y/w, z/w) where the projective, homogenous, coordinate [x:y:z:w] is one of many associated with a single point (x/w, y/w, z/w).

point :: Num a => V3 a -> V4 a #

Convert a 3-dimensional affine point into a 4-dimensional homogeneous vector, i.e. sets the w coordinate to 1.

vector :: Num a => V3 a -> V4 a #

Convert a 3-dimensional affine vector into a 4-dimensional homogeneous vector, i.e. sets the w coordinate to 0.

ew :: forall (t :: Type -> Type). R4 t => E t #

_wzyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wzxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wyzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wyxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wxzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wxyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zwyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zwxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zywx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zyxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zxwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_zxyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_ywzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_ywxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_yzwx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_yzxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_yxwz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_yxzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_xwzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_xwyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_xzwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_xzyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_xywz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V4 a) #

_wzy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wzx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wyz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wyx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wxz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wxy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_zwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_zwx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_zyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_zxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_ywz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_ywx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_yzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_yxw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_xwz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_xwy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_xzw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_xyw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V3 a) #

_wz :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

_wy :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

_wx :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

_zw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

_yw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

_xw :: forall (t :: Type -> Type) a. R4 t => Lens' (t a) (V2 a) #

data V4 a #

A 4-dimensional vector.

Constructors

V4 !a !a !a !a 

Instances

Instances details
Monad V4 
Instance details

Defined in Linear.V4

Methods

(>>=) :: V4 a -> (a -> V4 b) -> V4 b #

(>>) :: V4 a -> V4 b -> V4 b #

return :: a -> V4 a #

Functor V4 
Instance details

Defined in Linear.V4

Methods

fmap :: (a -> b) -> V4 a -> V4 b #

(<$) :: a -> V4 b -> V4 a #

MonadFix V4 
Instance details

Defined in Linear.V4

Methods

mfix :: (a -> V4 a) -> V4 a #

Applicative V4 
Instance details

Defined in Linear.V4

Methods

pure :: a -> V4 a #

(<*>) :: V4 (a -> b) -> V4 a -> V4 b #

liftA2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

(*>) :: V4 a -> V4 b -> V4 b #

(<*) :: V4 a -> V4 b -> V4 a #

Foldable V4 
Instance details

Defined in Linear.V4

Methods

fold :: Monoid m => V4 m -> m #

foldMap :: Monoid m => (a -> m) -> V4 a -> m #

foldMap' :: Monoid m => (a -> m) -> V4 a -> m #

foldr :: (a -> b -> b) -> b -> V4 a -> b #

foldr' :: (a -> b -> b) -> b -> V4 a -> b #

foldl :: (b -> a -> b) -> b -> V4 a -> b #

foldl' :: (b -> a -> b) -> b -> V4 a -> b #

foldr1 :: (a -> a -> a) -> V4 a -> a #

foldl1 :: (a -> a -> a) -> V4 a -> a #

toList :: V4 a -> [a] #

null :: V4 a -> Bool #

length :: V4 a -> Int #

elem :: Eq a => a -> V4 a -> Bool #

maximum :: Ord a => V4 a -> a #

minimum :: Ord a => V4 a -> a #

sum :: Num a => V4 a -> a #

product :: Num a => V4 a -> a #

Traversable V4 
Instance details

Defined in Linear.V4

Methods

traverse :: Applicative f => (a -> f b) -> V4 a -> f (V4 b) #

sequenceA :: Applicative f => V4 (f a) -> f (V4 a) #

mapM :: Monad m => (a -> m b) -> V4 a -> m (V4 b) #

sequence :: Monad m => V4 (m a) -> m (V4 a) #

Distributive V4 
Instance details

Defined in Linear.V4

Methods

distribute :: Functor f => f (V4 a) -> V4 (f a) #

collect :: Functor f => (a -> V4 b) -> f a -> V4 (f b) #

distributeM :: Monad m => m (V4 a) -> V4 (m a) #

collectM :: Monad m => (a -> V4 b) -> m a -> V4 (m b) #

Representable V4 
Instance details

Defined in Linear.V4

Associated Types

type Rep V4 #

Methods

tabulate :: (Rep V4 -> a) -> V4 a #

index :: V4 a -> Rep V4 -> a #

Eq1 V4 
Instance details

Defined in Linear.V4

Methods

liftEq :: (a -> b -> Bool) -> V4 a -> V4 b -> Bool #

Ord1 V4 
Instance details

Defined in Linear.V4

Methods

liftCompare :: (a -> b -> Ordering) -> V4 a -> V4 b -> Ordering #

Read1 V4 
Instance details

Defined in Linear.V4

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V4 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V4 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V4 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V4 a] #

Show1 V4 
Instance details

Defined in Linear.V4

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V4 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V4 a] -> ShowS #

MonadZip V4 
Instance details

Defined in Linear.V4

Methods

mzip :: V4 a -> V4 b -> V4 (a, b) #

mzipWith :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

munzip :: V4 (a, b) -> (V4 a, V4 b) #

Serial1 V4 
Instance details

Defined in Linear.V4

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V4 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V4 a) #

Hashable1 V4 
Instance details

Defined in Linear.V4

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> V4 a -> Int #

Apply V4 
Instance details

Defined in Linear.V4

Methods

(<.>) :: V4 (a -> b) -> V4 a -> V4 b #

(.>) :: V4 a -> V4 b -> V4 b #

(<.) :: V4 a -> V4 b -> V4 a #

liftF2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

Traversable1 V4 
Instance details

Defined in Linear.V4

Methods

traverse1 :: Apply f => (a -> f b) -> V4 a -> f (V4 b) #

sequence1 :: Apply f => V4 (f b) -> f (V4 b) #

Affine V4 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V4 :: Type -> Type #

Methods

(.-.) :: Num a => V4 a -> V4 a -> Diff V4 a #

(.+^) :: Num a => V4 a -> Diff V4 a -> V4 a #

(.-^) :: Num a => V4 a -> Diff V4 a -> V4 a #

Trace V4 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V4 (V4 a) -> a #

diagonal :: V4 (V4 a) -> V4 a #

R4 V4 
Instance details

Defined in Linear.V4

Methods

_w :: Lens' (V4 a) a #

_xyzw :: Lens' (V4 a) (V4 a) #

R3 V4 
Instance details

Defined in Linear.V4

Methods

_z :: Lens' (V4 a) a #

_xyz :: Lens' (V4 a) (V3 a) #

R2 V4 
Instance details

Defined in Linear.V4

Methods

_y :: Lens' (V4 a) a #

_xy :: Lens' (V4 a) (V2 a) #

R1 V4 
Instance details

Defined in Linear.V4

Methods

_x :: Lens' (V4 a) a #

Finite V4 
Instance details

Defined in Linear.V4

Associated Types

type Size V4 :: Nat #

Methods

toV :: V4 a -> V (Size V4) a #

fromV :: V (Size V4) a -> V4 a #

Metric V4 
Instance details

Defined in Linear.V4

Methods

dot :: Num a => V4 a -> V4 a -> a #

quadrance :: Num a => V4 a -> a #

qd :: Num a => V4 a -> V4 a -> a #

distance :: Floating a => V4 a -> V4 a -> a #

norm :: Floating a => V4 a -> a #

signorm :: Floating a => V4 a -> V4 a #

Additive V4 
Instance details

Defined in Linear.V4

Methods

zero :: Num a => V4 a #

(^+^) :: Num a => V4 a -> V4 a -> V4 a #

(^-^) :: Num a => V4 a -> V4 a -> V4 a #

lerp :: Num a => a -> V4 a -> V4 a -> V4 a #

liftU2 :: (a -> a -> a) -> V4 a -> V4 a -> V4 a #

liftI2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

Foldable1 V4 
Instance details

Defined in Linear.V4

Methods

fold1 :: Semigroup m => V4 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V4 a -> m #

toNonEmpty :: V4 a -> NonEmpty a #

Bind V4 
Instance details

Defined in Linear.V4

Methods

(>>-) :: V4 a -> (a -> V4 b) -> V4 b #

join :: V4 (V4 a) -> V4 a #

Lift a => Lift (V4 a :: Type) 
Instance details

Defined in Linear.V4

Methods

lift :: V4 a -> Q Exp #

liftTyped :: V4 a -> Q (TExp (V4 a)) #

Unbox a => Vector Vector (V4 a) 
Instance details

Defined in Linear.V4

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> m (Vector (V4 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V4 a) -> m (Mutable Vector (PrimState m) (V4 a)) #

basicLength :: Vector (V4 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V4 a) -> Vector (V4 a) #

basicUnsafeIndexM :: Monad m => Vector (V4 a) -> Int -> m (V4 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V4 a) -> Vector (V4 a) -> m () #

elemseq :: Vector (V4 a) -> V4 a -> b -> b #

Num r => Coalgebra r (E V4) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V4 -> r) -> E V4 -> E V4 -> r #

counital :: (E V4 -> r) -> r #

Unbox a => MVector MVector (V4 a) 
Instance details

Defined in Linear.V4

Methods

basicLength :: MVector s (V4 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V4 a) -> MVector s (V4 a) #

basicOverlaps :: MVector s (V4 a) -> MVector s (V4 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V4 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V4 a -> m (MVector (PrimState m) (V4 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (V4 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> V4 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V4 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V4 a) -> V4 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V4 a) -> MVector (PrimState m) (V4 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V4 a) -> Int -> m (MVector (PrimState m) (V4 a)) #

Bounded a => Bounded (V4 a) 
Instance details

Defined in Linear.V4

Methods

minBound :: V4 a #

maxBound :: V4 a #

Eq a => Eq (V4 a) 
Instance details

Defined in Linear.V4

Methods

(==) :: V4 a -> V4 a -> Bool #

(/=) :: V4 a -> V4 a -> Bool #

Floating a => Floating (V4 a) 
Instance details

Defined in Linear.V4

Methods

pi :: V4 a #

exp :: V4 a -> V4 a #

log :: V4 a -> V4 a #

sqrt :: V4 a -> V4 a #

(**) :: V4 a -> V4 a -> V4 a #

logBase :: V4 a -> V4 a -> V4 a #

sin :: V4 a -> V4 a #

cos :: V4 a -> V4 a #

tan :: V4 a -> V4 a #

asin :: V4 a -> V4 a #

acos :: V4 a -> V4 a #

atan :: V4 a -> V4 a #

sinh :: V4 a -> V4 a #

cosh :: V4 a -> V4 a #

tanh :: V4 a -> V4 a #

asinh :: V4 a -> V4 a #

acosh :: V4 a -> V4 a #

atanh :: V4 a -> V4 a #

log1p :: V4 a -> V4 a #

expm1 :: V4 a -> V4 a #

log1pexp :: V4 a -> V4 a #

log1mexp :: V4 a -> V4 a #

Fractional a => Fractional (V4 a) 
Instance details

Defined in Linear.V4

Methods

(/) :: V4 a -> V4 a -> V4 a #

recip :: V4 a -> V4 a #

fromRational :: Rational -> V4 a #

Data a => Data (V4 a) 
Instance details

Defined in Linear.V4

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V4 a -> c (V4 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V4 a) #

toConstr :: V4 a -> Constr #

dataTypeOf :: V4 a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V4 a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V4 a)) #

gmapT :: (forall b. Data b => b -> b) -> V4 a -> V4 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V4 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V4 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V4 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V4 a -> m (V4 a) #

Num a => Num (V4 a) 
Instance details

Defined in Linear.V4

Methods

(+) :: V4 a -> V4 a -> V4 a #

(-) :: V4 a -> V4 a -> V4 a #

(*) :: V4 a -> V4 a -> V4 a #

negate :: V4 a -> V4 a #

abs :: V4 a -> V4 a #

signum :: V4 a -> V4 a #

fromInteger :: Integer -> V4 a #

Ord a => Ord (V4 a) 
Instance details

Defined in Linear.V4

Methods

compare :: V4 a -> V4 a -> Ordering #

(<) :: V4 a -> V4 a -> Bool #

(<=) :: V4 a -> V4 a -> Bool #

(>) :: V4 a -> V4 a -> Bool #

(>=) :: V4 a -> V4 a -> Bool #

max :: V4 a -> V4 a -> V4 a #

min :: V4 a -> V4 a -> V4 a #

Read a => Read (V4 a) 
Instance details

Defined in Linear.V4

Show a => Show (V4 a) 
Instance details

Defined in Linear.V4

Methods

showsPrec :: Int -> V4 a -> ShowS #

show :: V4 a -> String #

showList :: [V4 a] -> ShowS #

Ix a => Ix (V4 a) 
Instance details

Defined in Linear.V4

Methods

range :: (V4 a, V4 a) -> [V4 a] #

index :: (V4 a, V4 a) -> V4 a -> Int #

unsafeIndex :: (V4 a, V4 a) -> V4 a -> Int #

inRange :: (V4 a, V4 a) -> V4 a -> Bool #

rangeSize :: (V4 a, V4 a) -> Int #

unsafeRangeSize :: (V4 a, V4 a) -> Int #

Generic (V4 a) 
Instance details

Defined in Linear.V4

Associated Types

type Rep (V4 a) :: Type -> Type #

Methods

from :: V4 a -> Rep (V4 a) x #

to :: Rep (V4 a) x -> V4 a #

Semigroup a => Semigroup (V4 a) 
Instance details

Defined in Linear.V4

Methods

(<>) :: V4 a -> V4 a -> V4 a #

sconcat :: NonEmpty (V4 a) -> V4 a #

stimes :: Integral b => b -> V4 a -> V4 a #

Monoid a => Monoid (V4 a) 
Instance details

Defined in Linear.V4

Methods

mempty :: V4 a #

mappend :: V4 a -> V4 a -> V4 a #

mconcat :: [V4 a] -> V4 a #

IfB a => IfB (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (V4 a) => bool -> V4 a -> V4 a -> V4 a #

EqB a => EqB (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (V4 a) => V4 a -> V4 a -> bool #

(/=*) :: bool ~ BooleanOf (V4 a) => V4 a -> V4 a -> bool #

Storable a => Storable (V4 a) 
Instance details

Defined in Linear.V4

Methods

sizeOf :: V4 a -> Int #

alignment :: V4 a -> Int #

peekElemOff :: Ptr (V4 a) -> Int -> IO (V4 a) #

pokeElemOff :: Ptr (V4 a) -> Int -> V4 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V4 a) #

pokeByteOff :: Ptr b -> Int -> V4 a -> IO () #

peek :: Ptr (V4 a) -> IO (V4 a) #

poke :: Ptr (V4 a) -> V4 a -> IO () #

Binary a => Binary (V4 a) 
Instance details

Defined in Linear.V4

Methods

put :: V4 a -> Put #

get :: Get (V4 a) #

putList :: [V4 a] -> Put #

Serial a => Serial (V4 a) 
Instance details

Defined in Linear.V4

Methods

serialize :: MonadPut m => V4 a -> m () #

deserialize :: MonadGet m => m (V4 a) #

Serialize a => Serialize (V4 a) 
Instance details

Defined in Linear.V4

Methods

put :: Putter (V4 a) #

get :: Get (V4 a) #

NFData a => NFData (V4 a) 
Instance details

Defined in Linear.V4

Methods

rnf :: V4 a -> () #

Hashable a => Hashable (V4 a) 
Instance details

Defined in Linear.V4

Methods

hashWithSalt :: Int -> V4 a -> Int #

hash :: V4 a -> Int #

Unbox a => Unbox (V4 a) 
Instance details

Defined in Linear.V4

Ixed (V4 a) 
Instance details

Defined in Linear.V4

Methods

ix :: Index (V4 a) -> Traversal' (V4 a) (IxValue (V4 a)) #

Epsilon a => Epsilon (V4 a) 
Instance details

Defined in Linear.V4

Methods

nearZero :: V4 a -> Bool #

Random a => Random (V4 a) 
Instance details

Defined in Linear.V4

Methods

randomR :: RandomGen g => (V4 a, V4 a) -> g -> (V4 a, g) #

random :: RandomGen g => g -> (V4 a, g) #

randomRs :: RandomGen g => (V4 a, V4 a) -> g -> [V4 a] #

randoms :: RandomGen g => g -> [V4 a] #

Real' a => Real' (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

rsqrt :: V4 a -> V4 a Source #

exp2 :: V4 a -> V4 a Source #

log2 :: V4 a -> V4 a Source #

floor' :: V4 a -> V4 a Source #

ceiling' :: V4 a -> V4 a Source #

fract' :: V4 a -> V4 a Source #

mod'' :: V4 a -> V4 a -> V4 a Source #

mix :: V4 a -> V4 a -> V4 a -> V4 a Source #

atan2' :: V4 a -> V4 a -> V4 a Source #

Integral' a => Integral' (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

div' :: V4 a -> V4 a -> V4 a Source #

mod' :: V4 a -> V4 a -> V4 a Source #

BufferFormat a => BufferFormat (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (V4 a) Source #

UniformInput a => UniformInput (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (V4 a) x Source #

Methods

toUniform :: ToUniform x (V4 a) (UniformFormat (V4 a) x) Source #

VertexInput a => VertexInput (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (V4 a) Source #

Methods

toVertex :: ToVertex (V4 a) (VertexFormat (V4 a)) Source #

FragmentInput a => FragmentInput (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (V4 a) Source #

FragmentCreator a => FragmentCreator (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

GeometryExplosive a => GeometryExplosive (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 V4 
Instance details

Defined in Linear.V4

Associated Types

type Rep1 V4 :: k -> Type #

Methods

from1 :: forall (a :: k). V4 a -> Rep1 V4 a #

to1 :: forall (a :: k). Rep1 V4 a -> V4 a #

FunctorWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

imap :: (E V4 -> a -> b) -> V4 a -> V4 b #

FoldableWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

ifoldMap :: Monoid m => (E V4 -> a -> m) -> V4 a -> m #

ifoldMap' :: Monoid m => (E V4 -> a -> m) -> V4 a -> m #

ifoldr :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

ifoldr' :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl' :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

TraversableWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

itraverse :: Applicative f => (E V4 -> a -> f b) -> V4 a -> f (V4 b) #

ShaderType a x => ShaderType (V4 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Associated Types

type ShaderBaseType (V4 a) Source #

Methods

toBase :: x -> V4 a -> ShaderBase (ShaderBaseType (V4 a)) x Source #

fromBase :: x -> ShaderBase (ShaderBaseType (V4 a)) x -> V4 a Source #

Each (V4 a) (V4 b) a b 
Instance details

Defined in Linear.V4

Methods

each :: Traversal (V4 a) (V4 b) a b #

Field1 (V4 a) (V4 a) a a 
Instance details

Defined in Linear.V4

Methods

_1 :: Lens (V4 a) (V4 a) a a #

Field2 (V4 a) (V4 a) a a 
Instance details

Defined in Linear.V4

Methods

_2 :: Lens (V4 a) (V4 a) a a #

Field3 (V4 a) (V4 a) a a 
Instance details

Defined in Linear.V4

Methods

_3 :: Lens (V4 a) (V4 a) a a #

Field4 (V4 a) (V4 a) a a 
Instance details

Defined in Linear.V4

Methods

_4 :: Lens (V4 a) (V4 a) a a #

type Rep V4 
Instance details

Defined in Linear.V4

type Rep V4 = E V4
type Diff V4 
Instance details

Defined in Linear.Affine

type Diff V4 = V4
type Size V4 
Instance details

Defined in Linear.V4

type Size V4 = 4
data MVector s (V4 a) 
Instance details

Defined in Linear.V4

data MVector s (V4 a) = MV_V4 !Int !(MVector s a)
type Rep (V4 a) 
Instance details

Defined in Linear.V4

type BooleanOf (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

type BooleanOf (V4 a) = BooleanOf a
data Vector (V4 a) 
Instance details

Defined in Linear.V4

data Vector (V4 a) = V_V4 !Int !(Vector a)
type Index (V4 a) 
Instance details

Defined in Linear.V4

type Index (V4 a) = E V4
type IxValue (V4 a) 
Instance details

Defined in Linear.V4

type IxValue (V4 a) = a
type ShaderBaseType (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

type HostFormat (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type HostFormat (V4 a) = V4 (HostFormat a)
type VertexFormat (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (V4 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 V4 
Instance details

Defined in Linear.V4

type UniformFormat (V4 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

type UniformFormat (V4 a) x = V4 (UniformFormat a x)

class R3 t => R4 (t :: Type -> Type) where #

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

Methods

_w :: Lens' (t a) a #

>>> V4 1 2 3 4 ^._w
4

_xyzw :: Lens' (t a) (V4 a) #

Instances

Instances details
R4 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_w :: Lens' (Quaternion a) a #

_xyzw :: Lens' (Quaternion a) (V4 a) #

R4 V4 
Instance details

Defined in Linear.V4

Methods

_w :: Lens' (V4 a) a #

_xyzw :: Lens' (V4 a) (V4 a) #

R4 f => R4 (Point f) 
Instance details

Defined in Linear.Affine

Methods

_w :: Lens' (Point f a) a #

_xyzw :: Lens' (Point f a) (V4 a) #

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

scalar triple product

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

cross product

ez :: forall (t :: Type -> Type). R3 t => E t #

_zyx :: 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) #

_yzx :: 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) #

_xzy :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V3 a) #

_zy :: 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) #

_yz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a) #

_xz :: forall (t :: Type -> Type) a. R3 t => Lens' (t a) (V2 a) #

data V3 a #

A 3-dimensional vector

Constructors

V3 !a !a !a 

Instances

Instances details
Monad V3 
Instance details

Defined in Linear.V3

Methods

(>>=) :: V3 a -> (a -> V3 b) -> V3 b #

(>>) :: V3 a -> V3 b -> V3 b #

return :: a -> V3 a #

Functor V3 
Instance details

Defined in Linear.V3

Methods

fmap :: (a -> b) -> V3 a -> V3 b #

(<$) :: a -> V3 b -> V3 a #

MonadFix V3 
Instance details

Defined in Linear.V3

Methods

mfix :: (a -> V3 a) -> V3 a #

Applicative V3 
Instance details

Defined in Linear.V3

Methods

pure :: a -> V3 a #

(<*>) :: V3 (a -> b) -> V3 a -> V3 b #

liftA2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

(*>) :: V3 a -> V3 b -> V3 b #

(<*) :: V3 a -> V3 b -> V3 a #

Foldable V3 
Instance details

Defined in Linear.V3

Methods

fold :: Monoid m => V3 m -> m #

foldMap :: Monoid m => (a -> m) -> V3 a -> m #

foldMap' :: Monoid m => (a -> m) -> V3 a -> m #

foldr :: (a -> b -> b) -> b -> V3 a -> b #

foldr' :: (a -> b -> b) -> b -> V3 a -> b #

foldl :: (b -> a -> b) -> b -> V3 a -> b #

foldl' :: (b -> a -> b) -> b -> V3 a -> b #

foldr1 :: (a -> a -> a) -> V3 a -> a #

foldl1 :: (a -> a -> a) -> V3 a -> a #

toList :: V3 a -> [a] #

null :: V3 a -> Bool #

length :: V3 a -> Int #

elem :: Eq a => a -> V3 a -> Bool #

maximum :: Ord a => V3 a -> a #

minimum :: Ord a => V3 a -> a #

sum :: Num a => V3 a -> a #

product :: Num a => V3 a -> a #

Traversable V3 
Instance details

Defined in Linear.V3

Methods

traverse :: Applicative f => (a -> f b) -> V3 a -> f (V3 b) #

sequenceA :: Applicative f => V3 (f a) -> f (V3 a) #

mapM :: Monad m => (a -> m b) -> V3 a -> m (V3 b) #

sequence :: Monad m => V3 (m a) -> m (V3 a) #

Distributive V3 
Instance details

Defined in Linear.V3

Methods

distribute :: Functor f => f (V3 a) -> V3 (f a) #

collect :: Functor f => (a -> V3 b) -> f a -> V3 (f b) #

distributeM :: Monad m => m (V3 a) -> V3 (m a) #

collectM :: Monad m => (a -> V3 b) -> m a -> V3 (m b) #

Representable V3 
Instance details

Defined in Linear.V3

Associated Types

type Rep V3 #

Methods

tabulate :: (Rep V3 -> a) -> V3 a #

index :: V3 a -> Rep V3 -> a #

Eq1 V3 
Instance details

Defined in Linear.V3

Methods

liftEq :: (a -> b -> Bool) -> V3 a -> V3 b -> Bool #

Ord1 V3 
Instance details

Defined in Linear.V3

Methods

liftCompare :: (a -> b -> Ordering) -> V3 a -> V3 b -> Ordering #

Read1 V3 
Instance details

Defined in Linear.V3

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V3 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V3 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V3 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V3 a] #

Show1 V3 
Instance details

Defined in Linear.V3

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V3 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V3 a] -> ShowS #

MonadZip V3 
Instance details

Defined in Linear.V3

Methods

mzip :: V3 a -> V3 b -> V3 (a, b) #

mzipWith :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

munzip :: V3 (a, b) -> (V3 a, V3 b) #

Serial1 V3 
Instance details

Defined in Linear.V3

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V3 a) #

Hashable1 V3 
Instance details

Defined in Linear.V3

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> V3 a -> Int #

Apply V3 
Instance details

Defined in Linear.V3

Methods

(<.>) :: V3 (a -> b) -> V3 a -> V3 b #

(.>) :: V3 a -> V3 b -> V3 b #

(<.) :: V3 a -> V3 b -> V3 a #

liftF2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Traversable1 V3 
Instance details

Defined in Linear.V3

Methods

traverse1 :: Apply f => (a -> f b) -> V3 a -> f (V3 b) #

sequence1 :: Apply f => V3 (f b) -> f (V3 b) #

Affine V3 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V3 :: Type -> Type #

Methods

(.-.) :: Num a => V3 a -> V3 a -> Diff V3 a #

(.+^) :: Num a => V3 a -> Diff V3 a -> V3 a #

(.-^) :: Num a => V3 a -> Diff V3 a -> V3 a #

Trace V3 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V3 (V3 a) -> a #

diagonal :: V3 (V3 a) -> V3 a #

R3 V3 
Instance details

Defined in Linear.V3

Methods

_z :: Lens' (V3 a) a #

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

R2 V3 
Instance details

Defined in Linear.V3

Methods

_y :: Lens' (V3 a) a #

_xy :: Lens' (V3 a) (V2 a) #

R1 V3 
Instance details

Defined in Linear.V3

Methods

_x :: Lens' (V3 a) a #

Finite V3 
Instance details

Defined in Linear.V3

Associated Types

type Size V3 :: Nat #

Methods

toV :: V3 a -> V (Size V3) a #

fromV :: V (Size V3) a -> V3 a #

Metric V3 
Instance details

Defined in Linear.V3

Methods

dot :: Num a => V3 a -> V3 a -> a #

quadrance :: Num a => V3 a -> a #

qd :: Num a => V3 a -> V3 a -> a #

distance :: Floating a => V3 a -> V3 a -> a #

norm :: Floating a => V3 a -> a #

signorm :: Floating a => V3 a -> V3 a #

Additive V3 
Instance details

Defined in Linear.V3

Methods

zero :: Num a => V3 a #

(^+^) :: Num a => V3 a -> V3 a -> V3 a #

(^-^) :: Num a => V3 a -> V3 a -> V3 a #

lerp :: Num a => a -> V3 a -> V3 a -> V3 a #

liftU2 :: (a -> a -> a) -> V3 a -> V3 a -> V3 a #

liftI2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Foldable1 V3 
Instance details

Defined in Linear.V3

Methods

fold1 :: Semigroup m => V3 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V3 a -> m #

toNonEmpty :: V3 a -> NonEmpty a #

Bind V3 
Instance details

Defined in Linear.V3

Methods

(>>-) :: V3 a -> (a -> V3 b) -> V3 b #

join :: V3 (V3 a) -> V3 a #

Lift a => Lift (V3 a :: Type) 
Instance details

Defined in Linear.V3

Methods

lift :: V3 a -> Q Exp #

liftTyped :: V3 a -> Q (TExp (V3 a)) #

Unbox a => Vector Vector (V3 a) 
Instance details

Defined in Linear.V3

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> m (Vector (V3 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V3 a) -> m (Mutable Vector (PrimState m) (V3 a)) #

basicLength :: Vector (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) #

basicUnsafeIndexM :: Monad m => Vector (V3 a) -> Int -> m (V3 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> Vector (V3 a) -> m () #

elemseq :: Vector (V3 a) -> V3 a -> b -> b #

Num r => Coalgebra r (E V3) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V3 -> r) -> E V3 -> E V3 -> r #

counital :: (E V3 -> r) -> r #

Unbox a => MVector MVector (V3 a) 
Instance details

Defined in Linear.V3

Methods

basicLength :: MVector s (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) #

basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V3 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V3 a -> m (MVector (PrimState m) (V3 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (V3 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> V3 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V3 a) -> V3 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (MVector (PrimState m) (V3 a)) #

Bounded a => Bounded (V3 a) 
Instance details

Defined in Linear.V3

Methods

minBound :: V3 a #

maxBound :: V3 a #

Eq a => Eq (V3 a) 
Instance details

Defined in Linear.V3

Methods

(==) :: V3 a -> V3 a -> Bool #

(/=) :: V3 a -> V3 a -> Bool #

Floating a => Floating (V3 a) 
Instance details

Defined in Linear.V3

Methods

pi :: V3 a #

exp :: V3 a -> V3 a #

log :: V3 a -> V3 a #

sqrt :: V3 a -> V3 a #

(**) :: V3 a -> V3 a -> V3 a #

logBase :: V3 a -> V3 a -> V3 a #

sin :: V3 a -> V3 a #

cos :: V3 a -> V3 a #

tan :: V3 a -> V3 a #

asin :: V3 a -> V3 a #

acos :: V3 a -> V3 a #

atan :: V3 a -> V3 a #

sinh :: V3 a -> V3 a #

cosh :: V3 a -> V3 a #

tanh :: V3 a -> V3 a #

asinh :: V3 a -> V3 a #

acosh :: V3 a -> V3 a #

atanh :: V3 a -> V3 a #

log1p :: V3 a -> V3 a #

expm1 :: V3 a -> V3 a #

log1pexp :: V3 a -> V3 a #

log1mexp :: V3 a -> V3 a #

Fractional a => Fractional (V3 a) 
Instance details

Defined in Linear.V3

Methods

(/) :: V3 a -> V3 a -> V3 a #

recip :: V3 a -> V3 a #

fromRational :: Rational -> V3 a #

Data a => Data (V3 a) 
Instance details

Defined in Linear.V3

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V3 a -> c (V3 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V3 a) #

toConstr :: V3 a -> Constr #

dataTypeOf :: V3 a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V3 a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)) #

gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V3 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V3 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

Num a => Num (V3 a) 
Instance details

Defined in Linear.V3

Methods

(+) :: V3 a -> V3 a -> V3 a #

(-) :: V3 a -> V3 a -> V3 a #

(*) :: V3 a -> V3 a -> V3 a #

negate :: V3 a -> V3 a #

abs :: V3 a -> V3 a #

signum :: V3 a -> V3 a #

fromInteger :: Integer -> V3 a #

Ord a => Ord (V3 a) 
Instance details

Defined in Linear.V3

Methods

compare :: V3 a -> V3 a -> Ordering #

(<) :: V3 a -> V3 a -> Bool #

(<=) :: V3 a -> V3 a -> Bool #

(>) :: V3 a -> V3 a -> Bool #

(>=) :: V3 a -> V3 a -> Bool #

max :: V3 a -> V3 a -> V3 a #

min :: V3 a -> V3 a -> V3 a #

Read a => Read (V3 a) 
Instance details

Defined in Linear.V3

Show a => Show (V3 a) 
Instance details

Defined in Linear.V3

Methods

showsPrec :: Int -> V3 a -> ShowS #

show :: V3 a -> String #

showList :: [V3 a] -> ShowS #

Ix a => Ix (V3 a) 
Instance details

Defined in Linear.V3

Methods

range :: (V3 a, V3 a) -> [V3 a] #

index :: (V3 a, V3 a) -> V3 a -> Int #

unsafeIndex :: (V3 a, V3 a) -> V3 a -> Int #

inRange :: (V3 a, V3 a) -> V3 a -> Bool #

rangeSize :: (V3 a, V3 a) -> Int #

unsafeRangeSize :: (V3 a, V3 a) -> Int #

Generic (V3 a) 
Instance details

Defined in Linear.V3

Associated Types

type Rep (V3 a) :: Type -> Type #

Methods

from :: V3 a -> Rep (V3 a) x #

to :: Rep (V3 a) x -> V3 a #

Semigroup a => Semigroup (V3 a) 
Instance details

Defined in Linear.V3

Methods

(<>) :: V3 a -> V3 a -> V3 a #

sconcat :: NonEmpty (V3 a) -> V3 a #

stimes :: Integral b => b -> V3 a -> V3 a #

Monoid a => Monoid (V3 a) 
Instance details

Defined in Linear.V3

Methods

mempty :: V3 a #

mappend :: V3 a -> V3 a -> V3 a #

mconcat :: [V3 a] -> V3 a #

IfB a => IfB (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (V3 a) => bool -> V3 a -> V3 a -> V3 a #

EqB a => EqB (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (V3 a) => V3 a -> V3 a -> bool #

(/=*) :: bool ~ BooleanOf (V3 a) => V3 a -> V3 a -> bool #

Storable a => Storable (V3 a) 
Instance details

Defined in Linear.V3

Methods

sizeOf :: V3 a -> Int #

alignment :: V3 a -> Int #

peekElemOff :: Ptr (V3 a) -> Int -> IO (V3 a) #

pokeElemOff :: Ptr (V3 a) -> Int -> V3 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V3 a) #

pokeByteOff :: Ptr b -> Int -> V3 a -> IO () #

peek :: Ptr (V3 a) -> IO (V3 a) #

poke :: Ptr (V3 a) -> V3 a -> IO () #

Binary a => Binary (V3 a) 
Instance details

Defined in Linear.V3

Methods

put :: V3 a -> Put #

get :: Get (V3 a) #

putList :: [V3 a] -> Put #

Serial a => Serial (V3 a) 
Instance details

Defined in Linear.V3

Methods

serialize :: MonadPut m => V3 a -> m () #

deserialize :: MonadGet m => m (V3 a) #

Serialize a => Serialize (V3 a) 
Instance details

Defined in Linear.V3

Methods

put :: Putter (V3 a) #

get :: Get (V3 a) #

NFData a => NFData (V3 a) 
Instance details

Defined in Linear.V3

Methods

rnf :: V3 a -> () #

Hashable a => Hashable (V3 a) 
Instance details

Defined in Linear.V3

Methods

hashWithSalt :: Int -> V3 a -> Int #

hash :: V3 a -> Int #

Unbox a => Unbox (V3 a) 
Instance details

Defined in Linear.V3

Ixed (V3 a) 
Instance details

Defined in Linear.V3

Methods

ix :: Index (V3 a) -> Traversal' (V3 a) (IxValue (V3 a)) #

Epsilon a => Epsilon (V3 a) 
Instance details

Defined in Linear.V3

Methods

nearZero :: V3 a -> Bool #

Random a => Random (V3 a) 
Instance details

Defined in Linear.V3

Methods

randomR :: RandomGen g => (V3 a, V3 a) -> g -> (V3 a, g) #

random :: RandomGen g => g -> (V3 a, g) #

randomRs :: RandomGen g => (V3 a, V3 a) -> g -> [V3 a] #

randoms :: RandomGen g => g -> [V3 a] #

Real' a => Real' (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

rsqrt :: V3 a -> V3 a Source #

exp2 :: V3 a -> V3 a Source #

log2 :: V3 a -> V3 a Source #

floor' :: V3 a -> V3 a Source #

ceiling' :: V3 a -> V3 a Source #

fract' :: V3 a -> V3 a Source #

mod'' :: V3 a -> V3 a -> V3 a Source #

mix :: V3 a -> V3 a -> V3 a -> V3 a Source #

atan2' :: V3 a -> V3 a -> V3 a Source #

Integral' a => Integral' (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

div' :: V3 a -> V3 a -> V3 a Source #

mod' :: V3 a -> V3 a -> V3 a Source #

BufferFormat a => BufferFormat (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (V3 a) Source #

UniformInput a => UniformInput (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (V3 a) x Source #

Methods

toUniform :: ToUniform x (V3 a) (UniformFormat (V3 a) x) Source #

VertexInput a => VertexInput (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (V3 a) Source #

Methods

toVertex :: ToVertex (V3 a) (VertexFormat (V3 a)) Source #

FragmentInput a => FragmentInput (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (V3 a) Source #

FragmentCreator a => FragmentCreator (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

GeometryExplosive a => GeometryExplosive (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 V3 
Instance details

Defined in Linear.V3

Associated Types

type Rep1 V3 :: k -> Type #

Methods

from1 :: forall (a :: k). V3 a -> Rep1 V3 a #

to1 :: forall (a :: k). Rep1 V3 a -> V3 a #

FunctorWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

imap :: (E V3 -> a -> b) -> V3 a -> V3 b #

FoldableWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

ifoldMap :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifoldMap' :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifoldr :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

ifoldr' :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl' :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

TraversableWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

itraverse :: Applicative f => (E V3 -> a -> f b) -> V3 a -> f (V3 b) #

ShaderType a x => ShaderType (V3 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Associated Types

type ShaderBaseType (V3 a) Source #

Methods

toBase :: x -> V3 a -> ShaderBase (ShaderBaseType (V3 a)) x Source #

fromBase :: x -> ShaderBase (ShaderBaseType (V3 a)) x -> V3 a Source #

Each (V3 a) (V3 b) a b 
Instance details

Defined in Linear.V3

Methods

each :: Traversal (V3 a) (V3 b) a b #

Field1 (V3 a) (V3 a) a a 
Instance details

Defined in Linear.V3

Methods

_1 :: Lens (V3 a) (V3 a) a a #

Field2 (V3 a) (V3 a) a a 
Instance details

Defined in Linear.V3

Methods

_2 :: Lens (V3 a) (V3 a) a a #

Field3 (V3 a) (V3 a) a a 
Instance details

Defined in Linear.V3

Methods

_3 :: Lens (V3 a) (V3 a) a a #

type Rep V3 
Instance details

Defined in Linear.V3

type Rep V3 = E V3
type Diff V3 
Instance details

Defined in Linear.Affine

type Diff V3 = V3
type Size V3 
Instance details

Defined in Linear.V3

type Size V3 = 3
data MVector s (V3 a) 
Instance details

Defined in Linear.V3

data MVector s (V3 a) = MV_V3 !Int !(MVector s a)
type Rep (V3 a) 
Instance details

Defined in Linear.V3

type Rep (V3 a) = D1 ('MetaData "V3" "Linear.V3" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "V3" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))))
type BooleanOf (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

type BooleanOf (V3 a) = BooleanOf a
data Vector (V3 a) 
Instance details

Defined in Linear.V3

data Vector (V3 a) = V_V3 !Int !(Vector a)
type Index (V3 a) 
Instance details

Defined in Linear.V3

type Index (V3 a) = E V3
type IxValue (V3 a) 
Instance details

Defined in Linear.V3

type IxValue (V3 a) = a
type ShaderBaseType (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

type HostFormat (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type HostFormat (V3 a) = V3 (HostFormat a)
type VertexFormat (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (V3 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 V3 
Instance details

Defined in Linear.V3

type UniformFormat (V3 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

type UniformFormat (V3 a) x = V3 (UniformFormat a x)

class R2 t => R3 (t :: Type -> Type) where #

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

Methods

_z :: Lens' (t a) a #

>>> V3 1 2 3 ^. _z
3

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

Instances

Instances details
R3 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_z :: Lens' (Quaternion a) a #

_xyz :: Lens' (Quaternion a) (V3 a) #

R3 V4 
Instance details

Defined in Linear.V4

Methods

_z :: Lens' (V4 a) a #

_xyz :: Lens' (V4 a) (V3 a) #

R3 V3 
Instance details

Defined in Linear.V3

Methods

_z :: Lens' (V3 a) a #

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

R3 f => R3 (Point f) 
Instance details

Defined in Linear.Affine

Methods

_z :: Lens' (Point f a) a #

_xyz :: Lens' (Point f a) (V3 a) #

crossZ :: Num a => V2 a -> V2 a -> a #

The Z-component of the cross product of two vectors in the XY-plane.

>>> crossZ (V2 1 0) (V2 0 1)
1

unangle :: (Floating a, Ord a) => V2 a -> a #

angle :: Floating a => a -> V2 a #

perp :: Num a => V2 a -> V2 a #

the counter-clockwise perpendicular vector

>>> perp $ V2 10 20
V2 (-20) 10

ey :: forall (t :: Type -> Type). R2 t => E t #

_yx :: forall (t :: Type -> Type) a. R2 t => Lens' (t a) (V2 a) #

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

data V2 a #

A 2-dimensional vector

>>> pure 1 :: V2 Int
V2 1 1
>>> V2 1 2 + V2 3 4
V2 4 6
>>> V2 1 2 * V2 3 4
V2 3 8
>>> sum (V2 1 2)
3

Constructors

V2 !a !a 

Instances

Instances details
Monad V2 
Instance details

Defined in Linear.V2

Methods

(>>=) :: V2 a -> (a -> V2 b) -> V2 b #

(>>) :: V2 a -> V2 b -> V2 b #

return :: a -> V2 a #

Functor V2 
Instance details

Defined in Linear.V2

Methods

fmap :: (a -> b) -> V2 a -> V2 b #

(<$) :: a -> V2 b -> V2 a #

MonadFix V2 
Instance details

Defined in Linear.V2

Methods

mfix :: (a -> V2 a) -> V2 a #

Applicative V2 
Instance details

Defined in Linear.V2

Methods

pure :: a -> V2 a #

(<*>) :: V2 (a -> b) -> V2 a -> V2 b #

liftA2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

(*>) :: V2 a -> V2 b -> V2 b #

(<*) :: V2 a -> V2 b -> V2 a #

Foldable V2 
Instance details

Defined in Linear.V2

Methods

fold :: Monoid m => V2 m -> m #

foldMap :: Monoid m => (a -> m) -> V2 a -> m #

foldMap' :: Monoid m => (a -> m) -> V2 a -> m #

foldr :: (a -> b -> b) -> b -> V2 a -> b #

foldr' :: (a -> b -> b) -> b -> V2 a -> b #

foldl :: (b -> a -> b) -> b -> V2 a -> b #

foldl' :: (b -> a -> b) -> b -> V2 a -> b #

foldr1 :: (a -> a -> a) -> V2 a -> a #

foldl1 :: (a -> a -> a) -> V2 a -> a #

toList :: V2 a -> [a] #

null :: V2 a -> Bool #

length :: V2 a -> Int #

elem :: Eq a => a -> V2 a -> Bool #

maximum :: Ord a => V2 a -> a #

minimum :: Ord a => V2 a -> a #

sum :: Num a => V2 a -> a #

product :: Num a => V2 a -> a #

Traversable V2 
Instance details

Defined in Linear.V2

Methods

traverse :: Applicative f => (a -> f b) -> V2 a -> f (V2 b) #

sequenceA :: Applicative f => V2 (f a) -> f (V2 a) #

mapM :: Monad m => (a -> m b) -> V2 a -> m (V2 b) #

sequence :: Monad m => V2 (m a) -> m (V2 a) #

Distributive V2 
Instance details

Defined in Linear.V2

Methods

distribute :: Functor f => f (V2 a) -> V2 (f a) #

collect :: Functor f => (a -> V2 b) -> f a -> V2 (f b) #

distributeM :: Monad m => m (V2 a) -> V2 (m a) #

collectM :: Monad m => (a -> V2 b) -> m a -> V2 (m b) #

Representable V2 
Instance details

Defined in Linear.V2

Associated Types

type Rep V2 #

Methods

tabulate :: (Rep V2 -> a) -> V2 a #

index :: V2 a -> Rep V2 -> a #

Eq1 V2 
Instance details

Defined in Linear.V2

Methods

liftEq :: (a -> b -> Bool) -> V2 a -> V2 b -> Bool #

Ord1 V2 
Instance details

Defined in Linear.V2

Methods

liftCompare :: (a -> b -> Ordering) -> V2 a -> V2 b -> Ordering #

Read1 V2 
Instance details

Defined in Linear.V2

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V2 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V2 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V2 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V2 a] #

Show1 V2 
Instance details

Defined in Linear.V2

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V2 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V2 a] -> ShowS #

MonadZip V2 
Instance details

Defined in Linear.V2

Methods

mzip :: V2 a -> V2 b -> V2 (a, b) #

mzipWith :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

munzip :: V2 (a, b) -> (V2 a, V2 b) #

Serial1 V2 
Instance details

Defined in Linear.V2

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V2 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V2 a) #

Hashable1 V2 
Instance details

Defined in Linear.V2

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> V2 a -> Int #

Apply V2 
Instance details

Defined in Linear.V2

Methods

(<.>) :: V2 (a -> b) -> V2 a -> V2 b #

(.>) :: V2 a -> V2 b -> V2 b #

(<.) :: V2 a -> V2 b -> V2 a #

liftF2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

Traversable1 V2 
Instance details

Defined in Linear.V2

Methods

traverse1 :: Apply f => (a -> f b) -> V2 a -> f (V2 b) #

sequence1 :: Apply f => V2 (f b) -> f (V2 b) #

Affine V2 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V2 :: Type -> Type #

Methods

(.-.) :: Num a => V2 a -> V2 a -> Diff V2 a #

(.+^) :: Num a => V2 a -> Diff V2 a -> V2 a #

(.-^) :: Num a => V2 a -> Diff V2 a -> V2 a #

Trace V2 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V2 (V2 a) -> a #

diagonal :: V2 (V2 a) -> V2 a #

R2 V2 
Instance details

Defined in Linear.V2

Methods

_y :: Lens' (V2 a) a #

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

R1 V2 
Instance details

Defined in Linear.V2

Methods

_x :: Lens' (V2 a) a #

Finite V2 
Instance details

Defined in Linear.V2

Associated Types

type Size V2 :: Nat #

Methods

toV :: V2 a -> V (Size V2) a #

fromV :: V (Size V2) a -> V2 a #

Metric V2 
Instance details

Defined in Linear.V2

Methods

dot :: Num a => V2 a -> V2 a -> a #

quadrance :: Num a => V2 a -> a #

qd :: Num a => V2 a -> V2 a -> a #

distance :: Floating a => V2 a -> V2 a -> a #

norm :: Floating a => V2 a -> a #

signorm :: Floating a => V2 a -> V2 a #

Additive V2 
Instance details

Defined in Linear.V2

Methods

zero :: Num a => V2 a #

(^+^) :: Num a => V2 a -> V2 a -> V2 a #

(^-^) :: Num a => V2 a -> V2 a -> V2 a #

lerp :: Num a => a -> V2 a -> V2 a -> V2 a #

liftU2 :: (a -> a -> a) -> V2 a -> V2 a -> V2 a #

liftI2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

Foldable1 V2 
Instance details

Defined in Linear.V2

Methods

fold1 :: Semigroup m => V2 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V2 a -> m #

toNonEmpty :: V2 a -> NonEmpty a #

Bind V2 
Instance details

Defined in Linear.V2

Methods

(>>-) :: V2 a -> (a -> V2 b) -> V2 b #

join :: V2 (V2 a) -> V2 a #

Lift a => Lift (V2 a :: Type) 
Instance details

Defined in Linear.V2

Methods

lift :: V2 a -> Q Exp #

liftTyped :: V2 a -> Q (TExp (V2 a)) #

Unbox a => Vector Vector (V2 a) 
Instance details

Defined in Linear.V2

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> m (Vector (V2 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V2 a) -> m (Mutable Vector (PrimState m) (V2 a)) #

basicLength :: Vector (V2 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V2 a) -> Vector (V2 a) #

basicUnsafeIndexM :: Monad m => Vector (V2 a) -> Int -> m (V2 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V2 a) -> Vector (V2 a) -> m () #

elemseq :: Vector (V2 a) -> V2 a -> b -> b #

Num r => Coalgebra r (E V2) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V2 -> r) -> E V2 -> E V2 -> r #

counital :: (E V2 -> r) -> r #

Unbox a => MVector MVector (V2 a) 
Instance details

Defined in Linear.V2

Methods

basicLength :: MVector s (V2 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V2 a) -> MVector s (V2 a) #

basicOverlaps :: MVector s (V2 a) -> MVector s (V2 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V2 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V2 a -> m (MVector (PrimState m) (V2 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (V2 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> V2 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V2 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V2 a) -> V2 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V2 a) -> MVector (PrimState m) (V2 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V2 a) -> Int -> m (MVector (PrimState m) (V2 a)) #

Bounded a => Bounded (V2 a) 
Instance details

Defined in Linear.V2

Methods

minBound :: V2 a #

maxBound :: V2 a #

Eq a => Eq (V2 a) 
Instance details

Defined in Linear.V2

Methods

(==) :: V2 a -> V2 a -> Bool #

(/=) :: V2 a -> V2 a -> Bool #

Floating a => Floating (V2 a) 
Instance details

Defined in Linear.V2

Methods

pi :: V2 a #

exp :: V2 a -> V2 a #

log :: V2 a -> V2 a #

sqrt :: V2 a -> V2 a #

(**) :: V2 a -> V2 a -> V2 a #

logBase :: V2 a -> V2 a -> V2 a #

sin :: V2 a -> V2 a #

cos :: V2 a -> V2 a #

tan :: V2 a -> V2 a #

asin :: V2 a -> V2 a #

acos :: V2 a -> V2 a #

atan :: V2 a -> V2 a #

sinh :: V2 a -> V2 a #

cosh :: V2 a -> V2 a #

tanh :: V2 a -> V2 a #

asinh :: V2 a -> V2 a #

acosh :: V2 a -> V2 a #

atanh :: V2 a -> V2 a #

log1p :: V2 a -> V2 a #

expm1 :: V2 a -> V2 a #

log1pexp :: V2 a -> V2 a #

log1mexp :: V2 a -> V2 a #

Fractional a => Fractional (V2 a) 
Instance details

Defined in Linear.V2

Methods

(/) :: V2 a -> V2 a -> V2 a #

recip :: V2 a -> V2 a #

fromRational :: Rational -> V2 a #

Data a => Data (V2 a) 
Instance details

Defined in Linear.V2

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V2 a -> c (V2 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V2 a) #

toConstr :: V2 a -> Constr #

dataTypeOf :: V2 a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V2 a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V2 a)) #

gmapT :: (forall b. Data b => b -> b) -> V2 a -> V2 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V2 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V2 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V2 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V2 a -> m (V2 a) #

Num a => Num (V2 a) 
Instance details

Defined in Linear.V2

Methods

(+) :: V2 a -> V2 a -> V2 a #

(-) :: V2 a -> V2 a -> V2 a #

(*) :: V2 a -> V2 a -> V2 a #

negate :: V2 a -> V2 a #

abs :: V2 a -> V2 a #

signum :: V2 a -> V2 a #

fromInteger :: Integer -> V2 a #

Ord a => Ord (V2 a) 
Instance details

Defined in Linear.V2

Methods

compare :: V2 a -> V2 a -> Ordering #

(<) :: V2 a -> V2 a -> Bool #

(<=) :: V2 a -> V2 a -> Bool #

(>) :: V2 a -> V2 a -> Bool #

(>=) :: V2 a -> V2 a -> Bool #

max :: V2 a -> V2 a -> V2 a #

min :: V2 a -> V2 a -> V2 a #

Read a => Read (V2 a) 
Instance details

Defined in Linear.V2

Show a => Show (V2 a) 
Instance details

Defined in Linear.V2

Methods

showsPrec :: Int -> V2 a -> ShowS #

show :: V2 a -> String #

showList :: [V2 a] -> ShowS #

Ix a => Ix (V2 a) 
Instance details

Defined in Linear.V2

Methods

range :: (V2 a, V2 a) -> [V2 a] #

index :: (V2 a, V2 a) -> V2 a -> Int #

unsafeIndex :: (V2 a, V2 a) -> V2 a -> Int #

inRange :: (V2 a, V2 a) -> V2 a -> Bool #

rangeSize :: (V2 a, V2 a) -> Int #

unsafeRangeSize :: (V2 a, V2 a) -> Int #

Generic (V2 a) 
Instance details

Defined in Linear.V2

Associated Types

type Rep (V2 a) :: Type -> Type #

Methods

from :: V2 a -> Rep (V2 a) x #

to :: Rep (V2 a) x -> V2 a #

Semigroup a => Semigroup (V2 a) 
Instance details

Defined in Linear.V2

Methods

(<>) :: V2 a -> V2 a -> V2 a #

sconcat :: NonEmpty (V2 a) -> V2 a #

stimes :: Integral b => b -> V2 a -> V2 a #

Monoid a => Monoid (V2 a) 
Instance details

Defined in Linear.V2

Methods

mempty :: V2 a #

mappend :: V2 a -> V2 a -> V2 a #

mconcat :: [V2 a] -> V2 a #

IfB a => IfB (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (V2 a) => bool -> V2 a -> V2 a -> V2 a #

EqB a => EqB (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (V2 a) => V2 a -> V2 a -> bool #

(/=*) :: bool ~ BooleanOf (V2 a) => V2 a -> V2 a -> bool #

Storable a => Storable (V2 a) 
Instance details

Defined in Linear.V2

Methods

sizeOf :: V2 a -> Int #

alignment :: V2 a -> Int #

peekElemOff :: Ptr (V2 a) -> Int -> IO (V2 a) #

pokeElemOff :: Ptr (V2 a) -> Int -> V2 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V2 a) #

pokeByteOff :: Ptr b -> Int -> V2 a -> IO () #

peek :: Ptr (V2 a) -> IO (V2 a) #

poke :: Ptr (V2 a) -> V2 a -> IO () #

Binary a => Binary (V2 a) 
Instance details

Defined in Linear.V2

Methods

put :: V2 a -> Put #

get :: Get (V2 a) #

putList :: [V2 a] -> Put #

Serial a => Serial (V2 a) 
Instance details

Defined in Linear.V2

Methods

serialize :: MonadPut m => V2 a -> m () #

deserialize :: MonadGet m => m (V2 a) #

Serialize a => Serialize (V2 a) 
Instance details

Defined in Linear.V2

Methods

put :: Putter (V2 a) #

get :: Get (V2 a) #

NFData a => NFData (V2 a) 
Instance details

Defined in Linear.V2

Methods

rnf :: V2 a -> () #

Hashable a => Hashable (V2 a) 
Instance details

Defined in Linear.V2

Methods

hashWithSalt :: Int -> V2 a -> Int #

hash :: V2 a -> Int #

Unbox a => Unbox (V2 a) 
Instance details

Defined in Linear.V2

Ixed (V2 a) 
Instance details

Defined in Linear.V2

Methods

ix :: Index (V2 a) -> Traversal' (V2 a) (IxValue (V2 a)) #

Epsilon a => Epsilon (V2 a) 
Instance details

Defined in Linear.V2

Methods

nearZero :: V2 a -> Bool #

Random a => Random (V2 a) 
Instance details

Defined in Linear.V2

Methods

randomR :: RandomGen g => (V2 a, V2 a) -> g -> (V2 a, g) #

random :: RandomGen g => g -> (V2 a, g) #

randomRs :: RandomGen g => (V2 a, V2 a) -> g -> [V2 a] #

randoms :: RandomGen g => g -> [V2 a] #

Real' a => Real' (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

rsqrt :: V2 a -> V2 a Source #

exp2 :: V2 a -> V2 a Source #

log2 :: V2 a -> V2 a Source #

floor' :: V2 a -> V2 a Source #

ceiling' :: V2 a -> V2 a Source #

fract' :: V2 a -> V2 a Source #

mod'' :: V2 a -> V2 a -> V2 a Source #

mix :: V2 a -> V2 a -> V2 a -> V2 a Source #

atan2' :: V2 a -> V2 a -> V2 a Source #

Integral' a => Integral' (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

div' :: V2 a -> V2 a -> V2 a Source #

mod' :: V2 a -> V2 a -> V2 a Source #

BufferFormat a => BufferFormat (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (V2 a) Source #

UniformInput a => UniformInput (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (V2 a) x Source #

Methods

toUniform :: ToUniform x (V2 a) (UniformFormat (V2 a) x) Source #

VertexInput a => VertexInput (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (V2 a) Source #

Methods

toVertex :: ToVertex (V2 a) (VertexFormat (V2 a)) Source #

FragmentInput a => FragmentInput (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (V2 a) Source #

FragmentCreator a => FragmentCreator (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

GeometryExplosive a => GeometryExplosive (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 V2 
Instance details

Defined in Linear.V2

Associated Types

type Rep1 V2 :: k -> Type #

Methods

from1 :: forall (a :: k). V2 a -> Rep1 V2 a #

to1 :: forall (a :: k). Rep1 V2 a -> V2 a #

FunctorWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

imap :: (E V2 -> a -> b) -> V2 a -> V2 b #

FoldableWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

ifoldMap :: Monoid m => (E V2 -> a -> m) -> V2 a -> m #

ifoldMap' :: Monoid m => (E V2 -> a -> m) -> V2 a -> m #

ifoldr :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

ifoldr' :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl' :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

TraversableWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

itraverse :: Applicative f => (E V2 -> a -> f b) -> V2 a -> f (V2 b) #

ShaderType a x => ShaderType (V2 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Associated Types

type ShaderBaseType (V2 a) Source #

Methods

toBase :: x -> V2 a -> ShaderBase (ShaderBaseType (V2 a)) x Source #

fromBase :: x -> ShaderBase (ShaderBaseType (V2 a)) x -> V2 a Source #

Each (V2 a) (V2 b) a b 
Instance details

Defined in Linear.V2

Methods

each :: Traversal (V2 a) (V2 b) a b #

Field1 (V2 a) (V2 a) a a 
Instance details

Defined in Linear.V2

Methods

_1 :: Lens (V2 a) (V2 a) a a #

Field2 (V2 a) (V2 a) a a 
Instance details

Defined in Linear.V2

Methods

_2 :: Lens (V2 a) (V2 a) a a #

type Rep V2 
Instance details

Defined in Linear.V2

type Rep V2 = E V2
type Diff V2 
Instance details

Defined in Linear.Affine

type Diff V2 = V2
type Size V2 
Instance details

Defined in Linear.V2

type Size V2 = 2
data MVector s (V2 a) 
Instance details

Defined in Linear.V2

data MVector s (V2 a) = MV_V2 !Int !(MVector s a)
type Rep (V2 a) 
Instance details

Defined in Linear.V2

type Rep (V2 a) = D1 ('MetaData "V2" "Linear.V2" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "V2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))
type BooleanOf (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

type BooleanOf (V2 a) = BooleanOf a
data Vector (V2 a) 
Instance details

Defined in Linear.V2

data Vector (V2 a) = V_V2 !Int !(Vector a)
type Index (V2 a) 
Instance details

Defined in Linear.V2

type Index (V2 a) = E V2
type IxValue (V2 a) 
Instance details

Defined in Linear.V2

type IxValue (V2 a) = a
type ShaderBaseType (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

type HostFormat (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type HostFormat (V2 a) = V2 (HostFormat a)
type VertexFormat (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (V2 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 V2 
Instance details

Defined in Linear.V2

type Rep1 V2 = D1 ('MetaData "V2" "Linear.V2" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'False) (C1 ('MetaCons "V2" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) Par1))
type UniformFormat (V2 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

type UniformFormat (V2 a) x = V2 (UniformFormat a x)

class R1 t => R2 (t :: Type -> Type) where #

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 #

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

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

Instances

Instances details
R2 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_y :: Lens' (Quaternion a) a #

_xy :: Lens' (Quaternion a) (V2 a) #

R2 V4 
Instance details

Defined in Linear.V4

Methods

_y :: Lens' (V4 a) a #

_xy :: Lens' (V4 a) (V2 a) #

R2 V3 
Instance details

Defined in Linear.V3

Methods

_y :: Lens' (V3 a) a #

_xy :: Lens' (V3 a) (V2 a) #

R2 V2 
Instance details

Defined in Linear.V2

Methods

_y :: Lens' (V2 a) a #

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

R2 f => R2 (Point f) 
Instance details

Defined in Linear.Affine

Methods

_y :: Lens' (Point f a) a #

_xy :: Lens' (Point f a) (V2 a) #

ex :: forall (t :: Type -> Type). R1 t => E t #

newtype V1 a #

A 1-dimensional vector

>>> pure 1 :: V1 Int
V1 1
>>> V1 2 + V1 3
V1 5
>>> V1 2 * V1 3
V1 6
>>> sum (V1 2)
2

Constructors

V1 a 

Instances

Instances details
Monad V1 
Instance details

Defined in Linear.V1

Methods

(>>=) :: V1 a -> (a -> V1 b) -> V1 b #

(>>) :: V1 a -> V1 b -> V1 b #

return :: a -> V1 a #

Functor V1 
Instance details

Defined in Linear.V1

Methods

fmap :: (a -> b) -> V1 a -> V1 b #

(<$) :: a -> V1 b -> V1 a #

MonadFix V1 
Instance details

Defined in Linear.V1

Methods

mfix :: (a -> V1 a) -> V1 a #

Applicative V1 
Instance details

Defined in Linear.V1

Methods

pure :: a -> V1 a #

(<*>) :: V1 (a -> b) -> V1 a -> V1 b #

liftA2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

(*>) :: V1 a -> V1 b -> V1 b #

(<*) :: V1 a -> V1 b -> V1 a #

Foldable V1 
Instance details

Defined in Linear.V1

Methods

fold :: Monoid m => V1 m -> m #

foldMap :: Monoid m => (a -> m) -> V1 a -> m #

foldMap' :: Monoid m => (a -> m) -> V1 a -> m #

foldr :: (a -> b -> b) -> b -> V1 a -> b #

foldr' :: (a -> b -> b) -> b -> V1 a -> b #

foldl :: (b -> a -> b) -> b -> V1 a -> b #

foldl' :: (b -> a -> b) -> b -> V1 a -> b #

foldr1 :: (a -> a -> a) -> V1 a -> a #

foldl1 :: (a -> a -> a) -> V1 a -> a #

toList :: V1 a -> [a] #

null :: V1 a -> Bool #

length :: V1 a -> Int #

elem :: Eq a => a -> V1 a -> Bool #

maximum :: Ord a => V1 a -> a #

minimum :: Ord a => V1 a -> a #

sum :: Num a => V1 a -> a #

product :: Num a => V1 a -> a #

Traversable V1 
Instance details

Defined in Linear.V1

Methods

traverse :: Applicative f => (a -> f b) -> V1 a -> f (V1 b) #

sequenceA :: Applicative f => V1 (f a) -> f (V1 a) #

mapM :: Monad m => (a -> m b) -> V1 a -> m (V1 b) #

sequence :: Monad m => V1 (m a) -> m (V1 a) #

Distributive V1 
Instance details

Defined in Linear.V1

Methods

distribute :: Functor f => f (V1 a) -> V1 (f a) #

collect :: Functor f => (a -> V1 b) -> f a -> V1 (f b) #

distributeM :: Monad m => m (V1 a) -> V1 (m a) #

collectM :: Monad m => (a -> V1 b) -> m a -> V1 (m b) #

Representable V1 
Instance details

Defined in Linear.V1

Associated Types

type Rep V1 #

Methods

tabulate :: (Rep V1 -> a) -> V1 a #

index :: V1 a -> Rep V1 -> a #

Eq1 V1 
Instance details

Defined in Linear.V1

Methods

liftEq :: (a -> b -> Bool) -> V1 a -> V1 b -> Bool #

Ord1 V1 
Instance details

Defined in Linear.V1

Methods

liftCompare :: (a -> b -> Ordering) -> V1 a -> V1 b -> Ordering #

Read1 V1 
Instance details

Defined in Linear.V1

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V1 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V1 a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (V1 a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [V1 a] #

Show1 V1 
Instance details

Defined in Linear.V1

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V1 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V1 a] -> ShowS #

MonadZip V1 
Instance details

Defined in Linear.V1

Methods

mzip :: V1 a -> V1 b -> V1 (a, b) #

mzipWith :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

munzip :: V1 (a, b) -> (V1 a, V1 b) #

Serial1 V1 
Instance details

Defined in Linear.V1

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V1 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V1 a) #

Hashable1 V1 
Instance details

Defined in Linear.V1

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> V1 a -> Int #

Apply V1 
Instance details

Defined in Linear.V1

Methods

(<.>) :: V1 (a -> b) -> V1 a -> V1 b #

(.>) :: V1 a -> V1 b -> V1 b #

(<.) :: V1 a -> V1 b -> V1 a #

liftF2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Traversable1 V1 
Instance details

Defined in Linear.V1

Methods

traverse1 :: Apply f => (a -> f b) -> V1 a -> f (V1 b) #

sequence1 :: Apply f => V1 (f b) -> f (V1 b) #

Affine V1 
Instance details

Defined in Linear.Affine

Associated Types

type Diff V1 :: Type -> Type #

Methods

(.-.) :: Num a => V1 a -> V1 a -> Diff V1 a #

(.+^) :: Num a => V1 a -> Diff V1 a -> V1 a #

(.-^) :: Num a => V1 a -> Diff V1 a -> V1 a #

Trace V1 
Instance details

Defined in Linear.Trace

Methods

trace :: Num a => V1 (V1 a) -> a #

diagonal :: V1 (V1 a) -> V1 a #

R1 V1 
Instance details

Defined in Linear.V1

Methods

_x :: Lens' (V1 a) a #

Finite V1 
Instance details

Defined in Linear.V1

Associated Types

type Size V1 :: Nat #

Methods

toV :: V1 a -> V (Size V1) a #

fromV :: V (Size V1) a -> V1 a #

Metric V1 
Instance details

Defined in Linear.V1

Methods

dot :: Num a => V1 a -> V1 a -> a #

quadrance :: Num a => V1 a -> a #

qd :: Num a => V1 a -> V1 a -> a #

distance :: Floating a => V1 a -> V1 a -> a #

norm :: Floating a => V1 a -> a #

signorm :: Floating a => V1 a -> V1 a #

Additive V1 
Instance details

Defined in Linear.V1

Methods

zero :: Num a => V1 a #

(^+^) :: Num a => V1 a -> V1 a -> V1 a #

(^-^) :: Num a => V1 a -> V1 a -> V1 a #

lerp :: Num a => a -> V1 a -> V1 a -> V1 a #

liftU2 :: (a -> a -> a) -> V1 a -> V1 a -> V1 a #

liftI2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Foldable1 V1 
Instance details

Defined in Linear.V1

Methods

fold1 :: Semigroup m => V1 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V1 a -> m #

toNonEmpty :: V1 a -> NonEmpty a #

Bind V1 
Instance details

Defined in Linear.V1

Methods

(>>-) :: V1 a -> (a -> V1 b) -> V1 b #

join :: V1 (V1 a) -> V1 a #

Lift a => Lift (V1 a :: Type) 
Instance details

Defined in Linear.V1

Methods

lift :: V1 a -> Q Exp #

liftTyped :: V1 a -> Q (TExp (V1 a)) #

Unbox a => Vector Vector (V1 a) 
Instance details

Defined in Linear.V1

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V1 a) -> m (Vector (V1 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V1 a) -> m (Mutable Vector (PrimState m) (V1 a)) #

basicLength :: Vector (V1 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V1 a) -> Vector (V1 a) #

basicUnsafeIndexM :: Monad m => Vector (V1 a) -> Int -> m (V1 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V1 a) -> Vector (V1 a) -> m () #

elemseq :: Vector (V1 a) -> V1 a -> b -> b #

Num r => Algebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V1 -> E V1 -> r) -> E V1 -> r #

unital :: r -> E V1 -> r #

Num r => Coalgebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V1 -> r) -> E V1 -> E V1 -> r #

counital :: (E V1 -> r) -> r #

Unbox a => MVector MVector (V1 a) 
Instance details

Defined in Linear.V1

Methods

basicLength :: MVector s (V1 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V1 a) -> MVector s (V1 a) #

basicOverlaps :: MVector s (V1 a) -> MVector s (V1 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V1 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V1 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V1 a -> m (MVector (PrimState m) (V1 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> m (V1 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> V1 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V1 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V1 a) -> V1 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V1 a) -> MVector (PrimState m) (V1 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V1 a) -> MVector (PrimState m) (V1 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V1 a) -> Int -> m (MVector (PrimState m) (V1 a)) #

Bounded a => Bounded (V1 a) 
Instance details

Defined in Linear.V1

Methods

minBound :: V1 a #

maxBound :: V1 a #

Eq a => Eq (V1 a) 
Instance details

Defined in Linear.V1

Methods

(==) :: V1 a -> V1 a -> Bool #

(/=) :: V1 a -> V1 a -> Bool #

Floating a => Floating (V1 a) 
Instance details

Defined in Linear.V1

Methods

pi :: V1 a #

exp :: V1 a -> V1 a #

log :: V1 a -> V1 a #

sqrt :: V1 a -> V1 a #

(**) :: V1 a -> V1 a -> V1 a #

logBase :: V1 a -> V1 a -> V1 a #

sin :: V1 a -> V1 a #

cos :: V1 a -> V1 a #

tan :: V1 a -> V1 a #

asin :: V1 a -> V1 a #

acos :: V1 a -> V1 a #

atan :: V1 a -> V1 a #

sinh :: V1 a -> V1 a #

cosh :: V1 a -> V1 a #

tanh :: V1 a -> V1 a #

asinh :: V1 a -> V1 a #

acosh :: V1 a -> V1 a #

atanh :: V1 a -> V1 a #

log1p :: V1 a -> V1 a #

expm1 :: V1 a -> V1 a #

log1pexp :: V1 a -> V1 a #

log1mexp :: V1 a -> V1 a #

Fractional a => Fractional (V1 a) 
Instance details

Defined in Linear.V1

Methods

(/) :: V1 a -> V1 a -> V1 a #

recip :: V1 a -> V1 a #

fromRational :: Rational -> V1 a #

Data a => Data (V1 a) 
Instance details

Defined in Linear.V1

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V1 a -> c (V1 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V1 a) #

toConstr :: V1 a -> Constr #

dataTypeOf :: V1 a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (V1 a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V1 a)) #

gmapT :: (forall b. Data b => b -> b) -> V1 a -> V1 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V1 a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V1 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V1 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V1 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V1 a -> m (V1 a) #

Num a => Num (V1 a) 
Instance details

Defined in Linear.V1

Methods

(+) :: V1 a -> V1 a -> V1 a #

(-) :: V1 a -> V1 a -> V1 a #

(*) :: V1 a -> V1 a -> V1 a #

negate :: V1 a -> V1 a #

abs :: V1 a -> V1 a #

signum :: V1 a -> V1 a #

fromInteger :: Integer -> V1 a #

Ord a => Ord (V1 a) 
Instance details

Defined in Linear.V1

Methods

compare :: V1 a -> V1 a -> Ordering #

(<) :: V1 a -> V1 a -> Bool #

(<=) :: V1 a -> V1 a -> Bool #

(>) :: V1 a -> V1 a -> Bool #

(>=) :: V1 a -> V1 a -> Bool #

max :: V1 a -> V1 a -> V1 a #

min :: V1 a -> V1 a -> V1 a #

Read a => Read (V1 a) 
Instance details

Defined in Linear.V1

Show a => Show (V1 a) 
Instance details

Defined in Linear.V1

Methods

showsPrec :: Int -> V1 a -> ShowS #

show :: V1 a -> String #

showList :: [V1 a] -> ShowS #

Ix a => Ix (V1 a) 
Instance details

Defined in Linear.V1

Methods

range :: (V1 a, V1 a) -> [V1 a] #

index :: (V1 a, V1 a) -> V1 a -> Int #

unsafeIndex :: (V1 a, V1 a) -> V1 a -> Int #

inRange :: (V1 a, V1 a) -> V1 a -> Bool #

rangeSize :: (V1 a, V1 a) -> Int #

unsafeRangeSize :: (V1 a, V1 a) -> Int #

Generic (V1 a) 
Instance details

Defined in Linear.V1

Associated Types

type Rep (V1 a) :: Type -> Type #

Methods

from :: V1 a -> Rep (V1 a) x #

to :: Rep (V1 a) x -> V1 a #

Semigroup a => Semigroup (V1 a) 
Instance details

Defined in Linear.V1

Methods

(<>) :: V1 a -> V1 a -> V1 a #

sconcat :: NonEmpty (V1 a) -> V1 a #

stimes :: Integral b => b -> V1 a -> V1 a #

Monoid a => Monoid (V1 a) 
Instance details

Defined in Linear.V1

Methods

mempty :: V1 a #

mappend :: V1 a -> V1 a -> V1 a #

mconcat :: [V1 a] -> V1 a #

IfB a => IfB (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

ifB :: bool ~ BooleanOf (V1 a) => bool -> V1 a -> V1 a -> V1 a #

EqB a => EqB (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

Methods

(==*) :: bool ~ BooleanOf (V1 a) => V1 a -> V1 a -> bool #

(/=*) :: bool ~ BooleanOf (V1 a) => V1 a -> V1 a -> bool #

Storable a => Storable (V1 a) 
Instance details

Defined in Linear.V1

Methods

sizeOf :: V1 a -> Int #

alignment :: V1 a -> Int #

peekElemOff :: Ptr (V1 a) -> Int -> IO (V1 a) #

pokeElemOff :: Ptr (V1 a) -> Int -> V1 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V1 a) #

pokeByteOff :: Ptr b -> Int -> V1 a -> IO () #

peek :: Ptr (V1 a) -> IO (V1 a) #

poke :: Ptr (V1 a) -> V1 a -> IO () #

Binary a => Binary (V1 a) 
Instance details

Defined in Linear.V1

Methods

put :: V1 a -> Put #

get :: Get (V1 a) #

putList :: [V1 a] -> Put #

Serial a => Serial (V1 a) 
Instance details

Defined in Linear.V1

Methods

serialize :: MonadPut m => V1 a -> m () #

deserialize :: MonadGet m => m (V1 a) #

Serialize a => Serialize (V1 a) 
Instance details

Defined in Linear.V1

Methods

put :: Putter (V1 a) #

get :: Get (V1 a) #

NFData a => NFData (V1 a) 
Instance details

Defined in Linear.V1

Methods

rnf :: V1 a -> () #

Hashable a => Hashable (V1 a) 
Instance details

Defined in Linear.V1

Methods

hashWithSalt :: Int -> V1 a -> Int #

hash :: V1 a -> Int #

Unbox a => Unbox (V1 a) 
Instance details

Defined in Linear.V1

Ixed (V1 a) 
Instance details

Defined in Linear.V1

Methods

ix :: Index (V1 a) -> Traversal' (V1 a) (IxValue (V1 a)) #

Epsilon a => Epsilon (V1 a) 
Instance details

Defined in Linear.V1

Methods

nearZero :: V1 a -> Bool #

Random a => Random (V1 a) 
Instance details

Defined in Linear.V1

Methods

randomR :: RandomGen g => (V1 a, V1 a) -> g -> (V1 a, g) #

random :: RandomGen g => g -> (V1 a, g) #

randomRs :: RandomGen g => (V1 a, V1 a) -> g -> [V1 a] #

randoms :: RandomGen g => g -> [V1 a] #

Real' a => Real' (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

rsqrt :: V1 a -> V1 a Source #

exp2 :: V1 a -> V1 a Source #

log2 :: V1 a -> V1 a Source #

floor' :: V1 a -> V1 a Source #

ceiling' :: V1 a -> V1 a Source #

fract' :: V1 a -> V1 a Source #

mod'' :: V1 a -> V1 a -> V1 a Source #

mix :: V1 a -> V1 a -> V1 a -> V1 a Source #

atan2' :: V1 a -> V1 a -> V1 a Source #

Integral' a => Integral' (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

div' :: V1 a -> V1 a -> V1 a Source #

mod' :: V1 a -> V1 a -> V1 a Source #

BufferFormat a => BufferFormat (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

Associated Types

type HostFormat (V1 a) Source #

UniformInput a => UniformInput (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

Associated Types

type UniformFormat (V1 a) x Source #

Methods

toUniform :: ToUniform x (V1 a) (UniformFormat (V1 a) x) Source #

VertexInput a => VertexInput (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

Associated Types

type VertexFormat (V1 a) Source #

Methods

toVertex :: ToVertex (V1 a) (VertexFormat (V1 a)) Source #

FragmentInput a => FragmentInput (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

Associated Types

type FragmentFormat (V1 a) Source #

FragmentCreator a => FragmentCreator (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherFragmentInput a => AnotherFragmentInput (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

GeometryExplosive a => GeometryExplosive (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

AnotherVertexInput a => AnotherVertexInput (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.GeometryStream

Generic1 V1 
Instance details

Defined in Linear.V1

Associated Types

type Rep1 V1 :: k -> Type #

Methods

from1 :: forall (a :: k). V1 a -> Rep1 V1 a #

to1 :: forall (a :: k). Rep1 V1 a -> V1 a #

FunctorWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

imap :: (E V1 -> a -> b) -> V1 a -> V1 b #

FoldableWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

ifoldMap :: Monoid m => (E V1 -> a -> m) -> V1 a -> m #

ifoldMap' :: Monoid m => (E V1 -> a -> m) -> V1 a -> m #

ifoldr :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

ifoldr' :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl' :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

TraversableWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

itraverse :: Applicative f => (E V1 -> a -> f b) -> V1 a -> f (V1 b) #

ShaderType a x => ShaderType (V1 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Associated Types

type ShaderBaseType (V1 a) Source #

Methods

toBase :: x -> V1 a -> ShaderBase (ShaderBaseType (V1 a)) x Source #

fromBase :: x -> ShaderBase (ShaderBaseType (V1 a)) x -> V1 a Source #

Each (V1 a) (V1 b) a b 
Instance details

Defined in Linear.V1

Methods

each :: Traversal (V1 a) (V1 b) a b #

Field1 (V1 a) (V1 b) a b 
Instance details

Defined in Linear.V1

Methods

_1 :: Lens (V1 a) (V1 b) a b #

type Rep V1 
Instance details

Defined in Linear.V1

type Rep V1 = E V1
type Diff V1 
Instance details

Defined in Linear.Affine

type Diff V1 = V1
type Size V1 
Instance details

Defined in Linear.V1

type Size V1 = 1
newtype MVector s (V1 a) 
Instance details

Defined in Linear.V1

newtype MVector s (V1 a) = MV_V1 (MVector s a)
type Rep (V1 a) 
Instance details

Defined in Linear.V1

type Rep (V1 a) = D1 ('MetaData "V1" "Linear.V1" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'True) (C1 ('MetaCons "V1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type BooleanOf (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Orphans

type BooleanOf (V1 a) = BooleanOf a
newtype Vector (V1 a) 
Instance details

Defined in Linear.V1

newtype Vector (V1 a) = V_V1 (Vector a)
type Index (V1 a) 
Instance details

Defined in Linear.V1

type Index (V1 a) = E V1
type IxValue (V1 a) 
Instance details

Defined in Linear.V1

type IxValue (V1 a) = a
type ShaderBaseType (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

type HostFormat (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Buffer

type HostFormat (V1 a) = V1 (HostFormat a)
type VertexFormat (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.PrimitiveStream

type FragmentFormat (V1 a) Source # 
Instance details

Defined in Graphics.GPipe.Internal.FragmentStream

type Rep1 V1 
Instance details

Defined in Linear.V1

type Rep1 V1 = D1 ('MetaData "V1" "Linear.V1" "linear-1.21.5-4f98bd9e78dc4cb78ff50f4b82d11b37d063fafe" 'True) (C1 ('MetaCons "V1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type UniformFormat (V1 a) x Source # 
Instance details

Defined in Graphics.GPipe.Internal.Uniform

type UniformFormat (V1 a) x = V1 (UniformFormat a x)

class R1 (t :: Type -> Type) where #

A space that has at least 1 basis vector _x.

Methods

_x :: Lens' (t a) a #

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

Instances

Instances details
R1 Identity 
Instance details

Defined in Linear.V1

Methods

_x :: Lens' (Identity a) a #

R1 Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

_x :: Lens' (Quaternion a) a #

R1 V4 
Instance details

Defined in Linear.V4

Methods

_x :: Lens' (V4 a) a #

R1 V3 
Instance details

Defined in Linear.V3

Methods

_x :: Lens' (V3 a) a #

R1 V2 
Instance details

Defined in Linear.V2

Methods

_x :: Lens' (V2 a) a #

R1 V1 
Instance details

Defined in Linear.V1

Methods

_x :: Lens' (V1 a) a #

R1 f => R1 (Point f) 
Instance details

Defined in Linear.Affine

Methods

_x :: Lens' (Point f a) a #

project :: (Metric v, Fractional a) => v a -> v a -> v a #

project u v computes the projection of v onto u.

normalize :: (Floating a, Metric f, Epsilon a) => f a -> f a #

Normalize a Metric functor to have unit norm. This function does not change the functor if its norm is 0 or 1.

class Additive f => Metric (f :: Type -> Type) where #

Free and sparse inner product/metric spaces.

Minimal complete definition

Nothing

Methods

dot :: Num a => f a -> f a -> a #

Compute the inner product of two vectors or (equivalently) convert a vector f a into a covector f a -> a.

>>> V2 1 2 `dot` V2 3 4
11

quadrance :: Num a => f a -> a #

Compute the squared norm. The name quadrance arises from Norman J. Wildberger's rational trigonometry.

qd :: Num a => f a -> f a -> a #

Compute the quadrance of the difference

distance :: Floating a => f a -> f a -> a #

Compute the distance between two vectors in a metric space

norm :: Floating a => f a -> a #

Compute the norm of a vector in a metric space

signorm :: Floating a => f a -> f a #

Convert a non-zero vector to unit vector.

Instances

Instances details
Metric [] 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => [a] -> [a] -> a #

quadrance :: Num a => [a] -> a #

qd :: Num a => [a] -> [a] -> a #

distance :: Floating a => [a] -> [a] -> a #

norm :: Floating a => [a] -> a #

signorm :: Floating a => [a] -> [a] #

Metric Maybe 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Maybe a -> Maybe a -> a #

quadrance :: Num a => Maybe a -> a #

qd :: Num a => Maybe a -> Maybe a -> a #

distance :: Floating a => Maybe a -> Maybe a -> a #

norm :: Floating a => Maybe a -> a #

signorm :: Floating a => Maybe a -> Maybe a #

Metric ZipList 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => ZipList a -> ZipList a -> a #

quadrance :: Num a => ZipList a -> a #

qd :: Num a => ZipList a -> ZipList a -> a #

distance :: Floating a => ZipList a -> ZipList a -> a #

norm :: Floating a => ZipList a -> a #

signorm :: Floating a => ZipList a -> ZipList a #

Metric Identity 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Identity a -> Identity a -> a #

quadrance :: Num a => Identity a -> a #

qd :: Num a => Identity a -> Identity a -> a #

distance :: Floating a => Identity a -> Identity a -> a #

norm :: Floating a => Identity a -> a #

signorm :: Floating a => Identity a -> Identity a #

Metric IntMap 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => IntMap a -> IntMap a -> a #

quadrance :: Num a => IntMap a -> a #

qd :: Num a => IntMap a -> IntMap a -> a #

distance :: Floating a => IntMap a -> IntMap a -> a #

norm :: Floating a => IntMap a -> a #

signorm :: Floating a => IntMap a -> IntMap a #

Metric Vector 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Vector a -> Vector a -> a #

quadrance :: Num a => Vector a -> a #

qd :: Num a => Vector a -> Vector a -> a #

distance :: Floating a => Vector a -> Vector a -> a #

norm :: Floating a => Vector a -> a #

signorm :: Floating a => Vector a -> Vector a #

Metric Plucker 
Instance details

Defined in Linear.Plucker

Methods

dot :: Num a => Plucker a -> Plucker a -> a #

quadrance :: Num a => Plucker a -> a #

qd :: Num a => Plucker a -> Plucker a -> a #

distance :: Floating a => Plucker a -> Plucker a -> a #

norm :: Floating a => Plucker a -> a #

signorm :: Floating a => Plucker a -> Plucker a #

Metric Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

dot :: Num a => Quaternion a -> Quaternion a -> a #

quadrance :: Num a => Quaternion a -> a #

qd :: Num a => Quaternion a -> Quaternion a -> a #

distance :: Floating a => Quaternion a -> Quaternion a -> a #

norm :: Floating a => Quaternion a -> a #

signorm :: Floating a => Quaternion a -> Quaternion a #

Metric V0 
Instance details

Defined in Linear.V0

Methods

dot :: Num a => V0 a -> V0 a -> a #

quadrance :: Num a => V0 a -> a #

qd :: Num a => V0 a -> V0 a -> a #

distance :: Floating a => V0 a -> V0 a -> a #

norm :: Floating a => V0 a -> a #

signorm :: Floating a => V0 a -> V0 a #

Metric V4 
Instance details

Defined in Linear.V4

Methods

dot :: Num a => V4 a -> V4 a -> a #

quadrance :: Num a => V4 a -> a #

qd :: Num a => V4 a -> V4 a -> a #

distance :: Floating a => V4 a -> V4 a -> a #

norm :: Floating a => V4 a -> a #

signorm :: Floating a => V4 a -> V4 a #

Metric V3 
Instance details

Defined in Linear.V3

Methods

dot :: Num a => V3 a -> V3 a -> a #

quadrance :: Num a => V3 a -> a #

qd :: Num a => V3 a -> V3 a -> a #

distance :: Floating a => V3 a -> V3 a -> a #

norm :: Floating a => V3 a -> a #

signorm :: Floating a => V3 a -> V3 a #

Metric V2 
Instance details

Defined in Linear.V2

Methods

dot :: Num a => V2 a -> V2 a -> a #

quadrance :: Num a => V2 a -> a #

qd :: Num a => V2 a -> V2 a -> a #

distance :: Floating a => V2 a -> V2 a -> a #

norm :: Floating a => V2 a -> a #

signorm :: Floating a => V2 a -> V2 a #

Metric V1 
Instance details

Defined in Linear.V1

Methods

dot :: Num a => V1 a -> V1 a -> a #

quadrance :: Num a => V1 a -> a #

qd :: Num a => V1 a -> V1 a -> a #

distance :: Floating a => V1 a -> V1 a -> a #

norm :: Floating a => V1 a -> a #

signorm :: Floating a => V1 a -> V1 a #

Ord k => Metric (Map k) 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Map k a -> Map k a -> a #

quadrance :: Num a => Map k a -> a #

qd :: Num a => Map k a -> Map k a -> a #

distance :: Floating a => Map k a -> Map k a -> a #

norm :: Floating a => Map k a -> a #

signorm :: Floating a => Map k a -> Map k a #

(Hashable k, Eq k) => Metric (HashMap k) 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => HashMap k a -> HashMap k a -> a #

quadrance :: Num a => HashMap k a -> a #

qd :: Num a => HashMap k a -> HashMap k a -> a #

distance :: Floating a => HashMap k a -> HashMap k a -> a #

norm :: Floating a => HashMap k a -> a #

signorm :: Floating a => HashMap k a -> HashMap k a #

Metric f => Metric (Point f) 
Instance details

Defined in Linear.Affine

Methods

dot :: Num a => Point f a -> Point f a -> a #

quadrance :: Num a => Point f a -> a #

qd :: Num a => Point f a -> Point f a -> a #

distance :: Floating a => Point f a -> Point f a -> a #

norm :: Floating a => Point f a -> a #

signorm :: Floating a => Point f a -> Point f a #

Dim n => Metric (V n) 
Instance details

Defined in Linear.V

Methods

dot :: Num a => V n a -> V n a -> a #

quadrance :: Num a => V n a -> a #

qd :: Num a => V n a -> V n a -> a #

distance :: Floating a => V n a -> V n a -> a #

norm :: Floating a => V n a -> a #

signorm :: Floating a => V n a -> V n a #

(Metric f, Metric g) => Metric (Product f g) 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Product f g a -> Product f g a -> a #

quadrance :: Num a => Product f g a -> a #

qd :: Num a => Product f g a -> Product f g a -> a #

distance :: Floating a => Product f g a -> Product f g a -> a #

norm :: Floating a => Product f g a -> a #

signorm :: Floating a => Product f g a -> Product f g a #

(Metric f, Metric g) => Metric (Compose f g) 
Instance details

Defined in Linear.Metric

Methods

dot :: Num a => Compose f g a -> Compose f g a -> a #

quadrance :: Num a => Compose f g a -> a #

qd :: Num a => Compose f g a -> Compose f g a -> a #

distance :: Floating a => Compose f g a -> Compose f g a -> a #

norm :: Floating a => Compose f g a -> a #

signorm :: Floating a => Compose f g a -> Compose f g a #

outer :: (Functor f, Functor g, Num a) => f a -> g a -> f (g a) #

Outer (tensor) product of two vectors

unit :: (Additive t, Num a) => ASetter' (t a) a -> t a #

Create a unit vector.

>>> unit _x :: V2 Int
V2 1 0

scaled :: (Traversable t, Num a) => t a -> t (t a) #

Produce a diagonal (scale) matrix from a vector.

>>> scaled (V2 2 3)
V2 (V2 2 0) (V2 0 3)

basisFor :: (Traversable t, Num a) => t b -> [t a] #

Produce a default basis for a vector space from which the argument is drawn.

basis :: (Additive t, Traversable t, Num a) => [t a] #

Produce a default basis for a vector space. If the dimensionality of the vector space is not statically known, see basisFor.

(^/) :: (Functor f, Fractional a) => f a -> a -> f a infixl 7 #

Compute division by a scalar on the right.

(^*) :: (Functor f, Num a) => f a -> a -> f a infixl 7 #

Compute the right scalar product

>>> V2 3 4 ^* 2
V2 6 8

(*^) :: (Functor f, Num a) => a -> f a -> f a infixl 7 #

Compute the left scalar product

>>> 2 *^ V2 3 4
V2 6 8

sumV :: (Foldable f, Additive v, Num a) => f (v a) -> v a #

Sum over multiple vectors

>>> sumV [V2 1 1, V2 3 4]
V2 4 5

negated :: (Functor f, Num a) => f a -> f a #

Compute the negation of a vector

>>> negated (V2 2 4)
V2 (-2) (-4)

newtype E (t :: Type -> Type) #

Basis element

Constructors

E 

Fields

Instances

Instances details
Num r => Algebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V0 -> E V0 -> r) -> E V0 -> r #

unital :: r -> E V0 -> r #

Num r => Algebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E V1 -> E V1 -> r) -> E V1 -> r #

unital :: r -> E V1 -> r #

Num r => Algebra r (E Complex) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E Complex -> E Complex -> r) -> E Complex -> r #

unital :: r -> E Complex -> r #

(Num r, TrivialConjugate r) => Algebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

mult :: (E Quaternion -> E Quaternion -> r) -> E Quaternion -> r #

unital :: r -> E Quaternion -> r #

Num r => Coalgebra r (E V0) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V0 -> r) -> E V0 -> E V0 -> r #

counital :: (E V0 -> r) -> r #

Num r => Coalgebra r (E V1) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V1 -> r) -> E V1 -> E V1 -> r #

counital :: (E V1 -> r) -> r #

Num r => Coalgebra r (E V2) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V2 -> r) -> E V2 -> E V2 -> r #

counital :: (E V2 -> r) -> r #

Num r => Coalgebra r (E V3) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V3 -> r) -> E V3 -> E V3 -> r #

counital :: (E V3 -> r) -> r #

Num r => Coalgebra r (E V4) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E V4 -> r) -> E V4 -> E V4 -> r #

counital :: (E V4 -> r) -> r #

Num r => Coalgebra r (E Complex) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E Complex -> r) -> E Complex -> E Complex -> r #

counital :: (E Complex -> r) -> r #

(Num r, TrivialConjugate r) => Coalgebra r (E Quaternion) 
Instance details

Defined in Linear.Algebra

Methods

comult :: (E Quaternion -> r) -> E Quaternion -> E Quaternion -> r #

counital :: (E Quaternion -> r) -> r #

FunctorWithIndex (E Plucker) Plucker 
Instance details

Defined in Linear.Plucker

Methods

imap :: (E Plucker -> a -> b) -> Plucker a -> Plucker b #

FunctorWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

imap :: (E Quaternion -> a -> b) -> Quaternion a -> Quaternion b #

FunctorWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

imap :: (E V0 -> a -> b) -> V0 a -> V0 b #

FunctorWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

imap :: (E V4 -> a -> b) -> V4 a -> V4 b #

FunctorWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

imap :: (E V3 -> a -> b) -> V3 a -> V3 b #

FunctorWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

imap :: (E V2 -> a -> b) -> V2 a -> V2 b #

FunctorWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

imap :: (E V1 -> a -> b) -> V1 a -> V1 b #

FoldableWithIndex (E Plucker) Plucker 
Instance details

Defined in Linear.Plucker

Methods

ifoldMap :: Monoid m => (E Plucker -> a -> m) -> Plucker a -> m #

ifoldMap' :: Monoid m => (E Plucker -> a -> m) -> Plucker a -> m #

ifoldr :: (E Plucker -> a -> b -> b) -> b -> Plucker a -> b #

ifoldl :: (E Plucker -> b -> a -> b) -> b -> Plucker a -> b #

ifoldr' :: (E Plucker -> a -> b -> b) -> b -> Plucker a -> b #

ifoldl' :: (E Plucker -> b -> a -> b) -> b -> Plucker a -> b #

FoldableWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

ifoldMap :: Monoid m => (E Quaternion -> a -> m) -> Quaternion a -> m #

ifoldMap' :: Monoid m => (E Quaternion -> a -> m) -> Quaternion a -> m #

ifoldr :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

ifoldr' :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl' :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

FoldableWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

ifoldMap :: Monoid m => (E V0 -> a -> m) -> V0 a -> m #

ifoldMap' :: Monoid m => (E V0 -> a -> m) -> V0 a -> m #

ifoldr :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

ifoldr' :: (E V0 -> a -> b -> b) -> b -> V0 a -> b #

ifoldl' :: (E V0 -> b -> a -> b) -> b -> V0 a -> b #

FoldableWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

ifoldMap :: Monoid m => (E V4 -> a -> m) -> V4 a -> m #

ifoldMap' :: Monoid m => (E V4 -> a -> m) -> V4 a -> m #

ifoldr :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

ifoldr' :: (E V4 -> a -> b -> b) -> b -> V4 a -> b #

ifoldl' :: (E V4 -> b -> a -> b) -> b -> V4 a -> b #

FoldableWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

ifoldMap :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifoldMap' :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifoldr :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

ifoldr' :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl' :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

FoldableWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

ifoldMap :: Monoid m => (E V2 -> a -> m) -> V2 a -> m #

ifoldMap' :: Monoid m => (E V2 -> a -> m) -> V2 a -> m #

ifoldr :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

ifoldr' :: (E V2 -> a -> b -> b) -> b -> V2 a -> b #

ifoldl' :: (E V2 -> b -> a -> b) -> b -> V2 a -> b #

FoldableWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

ifoldMap :: Monoid m => (E V1 -> a -> m) -> V1 a -> m #

ifoldMap' :: Monoid m => (E V1 -> a -> m) -> V1 a -> m #

ifoldr :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

ifoldr' :: (E V1 -> a -> b -> b) -> b -> V1 a -> b #

ifoldl' :: (E V1 -> b -> a -> b) -> b -> V1 a -> b #

TraversableWithIndex (E Plucker) Plucker 
Instance details

Defined in Linear.Plucker

Methods

itraverse :: Applicative f => (E Plucker -> a -> f b) -> Plucker a -> f (Plucker b) #

TraversableWithIndex (E Quaternion) Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

itraverse :: Applicative f => (E Quaternion -> a -> f b) -> Quaternion a -> f (Quaternion b) #

TraversableWithIndex (E V0) V0 
Instance details

Defined in Linear.V0

Methods

itraverse :: Applicative f => (E V0 -> a -> f b) -> V0 a -> f (V0 b) #

TraversableWithIndex (E V4) V4 
Instance details

Defined in Linear.V4

Methods

itraverse :: Applicative f => (E V4 -> a -> f b) -> V4 a -> f (V4 b) #

TraversableWithIndex (E V3) V3 
Instance details

Defined in Linear.V3

Methods

itraverse :: Applicative f => (E V3 -> a -> f b) -> V3 a -> f (V3 b) #

TraversableWithIndex (E V2) V2 
Instance details

Defined in Linear.V2

Methods

itraverse :: Applicative f => (E V2 -> a -> f b) -> V2 a -> f (V2 b) #

TraversableWithIndex (E V1) V1 
Instance details

Defined in Linear.V1

Methods

itraverse :: Applicative f => (E V1 -> a -> f b) -> V1 a -> f (V1 b) #

class Functor f => Additive (f :: Type -> Type) where #

A vector is an additive group with additional structure.

Minimal complete definition

Nothing

Methods

zero :: Num a => f a #

The zero vector

(^+^) :: Num a => f a -> f a -> f a infixl 6 #

Compute the sum of two vectors

>>> V2 1 2 ^+^ V2 3 4
V2 4 6

(^-^) :: Num a => f a -> f a -> f a infixl 6 #

Compute the difference between two vectors

>>> V2 4 5 ^-^ V2 3 1
V2 1 4

lerp :: Num a => a -> f a -> f a -> f a #

Linearly interpolate between two vectors.

liftU2 :: (a -> a -> a) -> f a -> f a -> f a #

Apply a function to merge the 'non-zero' components of two vectors, unioning the rest of the values.

  • For a dense vector this is equivalent to liftA2.
  • For a sparse vector this is equivalent to unionWith.

liftI2 :: (a -> b -> c) -> f a -> f b -> f c #

Apply a function to the components of two vectors.

Instances

Instances details
Additive [] 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => [a] #

(^+^) :: Num a => [a] -> [a] -> [a] #

(^-^) :: Num a => [a] -> [a] -> [a] #

lerp :: Num a => a -> [a] -> [a] -> [a] #

liftU2 :: (a -> a -> a) -> [a] -> [a] -> [a] #

liftI2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

Additive Maybe 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Maybe a #

(^+^) :: Num a => Maybe a -> Maybe a -> Maybe a #

(^-^) :: Num a => Maybe a -> Maybe a -> Maybe a #

lerp :: Num a => a -> Maybe a -> Maybe a -> Maybe a #

liftU2 :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe a #

liftI2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

Additive Complex 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Complex a #

(^+^) :: Num a => Complex a -> Complex a -> Complex a #

(^-^) :: Num a => Complex a -> Complex a -> Complex a #

lerp :: Num a => a -> Complex a -> Complex a -> Complex a #

liftU2 :: (a -> a -> a) -> Complex a -> Complex a -> Complex a #

liftI2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

Additive ZipList 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => ZipList a #

(^+^) :: Num a => ZipList a -> ZipList a -> ZipList a #

(^-^) :: Num a => ZipList a -> ZipList a -> ZipList a #

lerp :: Num a => a -> ZipList a -> ZipList a -> ZipList a #

liftU2 :: (a -> a -> a) -> ZipList a -> ZipList a -> ZipList a #

liftI2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

Additive Identity 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Identity a #

(^+^) :: Num a => Identity a -> Identity a -> Identity a #

(^-^) :: Num a => Identity a -> Identity a -> Identity a #

lerp :: Num a => a -> Identity a -> Identity a -> Identity a #

liftU2 :: (a -> a -> a) -> Identity a -> Identity a -> Identity a #

liftI2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

Additive IntMap 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => IntMap a #

(^+^) :: Num a => IntMap a -> IntMap a -> IntMap a #

(^-^) :: Num a => IntMap a -> IntMap a -> IntMap a #

lerp :: Num a => a -> IntMap a -> IntMap a -> IntMap a #

liftU2 :: (a -> a -> a) -> IntMap a -> IntMap a -> IntMap a #

liftI2 :: (a -> b -> c) -> IntMap a -> IntMap b -> IntMap c #

Additive Vector 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Vector a #

(^+^) :: Num a => Vector a -> Vector a -> Vector a #

(^-^) :: Num a => Vector a -> Vector a -> Vector a #

lerp :: Num a => a -> Vector a -> Vector a -> Vector a #

liftU2 :: (a -> a -> a) -> Vector a -> Vector a -> Vector a #

liftI2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

Additive Plucker 
Instance details

Defined in Linear.Plucker

Methods

zero :: Num a => Plucker a #

(^+^) :: Num a => Plucker a -> Plucker a -> Plucker a #

(^-^) :: Num a => Plucker a -> Plucker a -> Plucker a #

lerp :: Num a => a -> Plucker a -> Plucker a -> Plucker a #

liftU2 :: (a -> a -> a) -> Plucker a -> Plucker a -> Plucker a #

liftI2 :: (a -> b -> c) -> Plucker a -> Plucker b -> Plucker c #

Additive Quaternion 
Instance details

Defined in Linear.Quaternion

Methods

zero :: Num a => Quaternion a #

(^+^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

(^-^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

lerp :: Num a => a -> Quaternion a -> Quaternion a -> Quaternion a #

liftU2 :: (a -> a -> a) -> Quaternion a -> Quaternion a -> Quaternion a #

liftI2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

Additive V0 
Instance details

Defined in Linear.V0

Methods

zero :: Num a => V0 a #

(^+^) :: Num a => V0 a -> V0 a -> V0 a #

(^-^) :: Num a => V0 a -> V0 a -> V0 a #

lerp :: Num a => a -> V0 a -> V0 a -> V0 a #

liftU2 :: (a -> a -> a) -> V0 a -> V0 a -> V0 a #

liftI2 :: (a -> b -> c) -> V0 a -> V0 b -> V0 c #

Additive V4 
Instance details

Defined in Linear.V4

Methods

zero :: Num a => V4 a #

(^+^) :: Num a => V4 a -> V4 a -> V4 a #

(^-^) :: Num a => V4 a -> V4 a -> V4 a #

lerp :: Num a => a -> V4 a -> V4 a -> V4 a #

liftU2 :: (a -> a -> a) -> V4 a -> V4 a -> V4 a #

liftI2 :: (a -> b -> c) -> V4 a -> V4 b -> V4 c #

Additive V3 
Instance details

Defined in Linear.V3

Methods

zero :: Num a => V3 a #

(^+^) :: Num a => V3 a -> V3 a -> V3 a #

(^-^) :: Num a => V3 a -> V3 a -> V3 a #

lerp :: Num a => a -> V3 a -> V3 a -> V3 a #

liftU2 :: (a -> a -> a) -> V3 a -> V3 a -> V3 a #

liftI2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Additive V2 
Instance details

Defined in Linear.V2

Methods

zero :: Num a => V2 a #

(^+^) :: Num a => V2 a -> V2 a -> V2 a #

(^-^) :: Num a => V2 a -> V2 a -> V2 a #

lerp :: Num a => a -> V2 a -> V2 a -> V2 a #

liftU2 :: (a -> a -> a) -> V2 a -> V2 a -> V2 a #

liftI2 :: (a -> b -> c) -> V2 a -> V2 b -> V2 c #

Additive V1 
Instance details

Defined in Linear.V1

Methods

zero :: Num a => V1 a #

(^+^) :: Num a => V1 a -> V1 a -> V1 a #

(^-^) :: Num a => V1 a -> V1 a -> V1 a #

lerp :: Num a => a -> V1 a -> V1 a -> V1 a #

liftU2 :: (a -> a -> a) -> V1 a -> V1 a -> V1 a #

liftI2 :: (a -> b -> c) -> V1 a -> V1 b -> V1 c #

Ord k => Additive (Map k) 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Map k a #

(^+^) :: Num a => Map k a -> Map k a -> Map k a #

(^-^) :: Num a => Map k a -> Map k a -> Map k a #

lerp :: Num a => a -> Map k a -> Map k a -> Map k a #

liftU2 :: (a -> a -> a) -> Map k a -> Map k a -> Map k a #

liftI2 :: (a -> b -> c) -> Map k a -> Map k b -> Map k c #

(Eq k, Hashable k) => Additive (HashMap k) 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => HashMap k a #

(^+^) :: Num a => HashMap k a -> HashMap k a -> HashMap k a #

(^-^) :: Num a => HashMap k a -> HashMap k a -> HashMap k a #

lerp :: Num a => a -> HashMap k a -> HashMap k a -> HashMap k a #

liftU2 :: (a -> a -> a) -> HashMap k a -> HashMap k a -> HashMap k a #

liftI2 :: (a -> b -> c) -> HashMap k a -> HashMap k b -> HashMap k c #

Additive f => Additive (Point f) 
Instance details

Defined in Linear.Affine

Methods

zero :: Num a => Point f a #

(^+^) :: Num a => Point f a -> Point f a -> Point f a #

(^-^) :: Num a => Point f a -> Point f a -> Point f a #

lerp :: Num a => a -> Point f a -> Point f a -> Point f a #

liftU2 :: (a -> a -> a) -> Point f a -> Point f a -> Point f a #

liftI2 :: (a -> b -> c) -> Point f a -> Point f b -> Point f c #

Dim n => Additive (V n) 
Instance details

Defined in Linear.V

Methods

zero :: Num a => V n a #

(^+^) :: Num a => V n a -> V n a -> V n a #

(^-^) :: Num a => V n a -> V n a -> V n a #

lerp :: Num a => a -> V n a -> V n a -> V n a #

liftU2 :: (a -> a -> a) -> V n a -> V n a -> V n a #

liftI2 :: (a -> b -> c) -> V n a -> V n b -> V n c #

Additive ((->) b :: Type -> Type) 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => b -> a #

(^+^) :: Num a => (b -> a) -> (b -> a) -> b -> a #

(^-^) :: Num a => (b -> a) -> (b -> a) -> b -> a #

lerp :: Num a => a -> (b -> a) -> (b -> a) -> b -> a #

liftU2 :: (a -> a -> a) -> (b -> a) -> (b -> a) -> b -> a #

liftI2 :: (a -> b0 -> c) -> (b -> a) -> (b -> b0) -> b -> c #

(Additive f, Additive g) => Additive (Product f g) 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Product f g a #

(^+^) :: Num a => Product f g a -> Product f g a -> Product f g a #

(^-^) :: Num a => Product f g a -> Product f g a -> Product f g a #

lerp :: Num a => a -> Product f g a -> Product f g a -> Product f g a #

liftU2 :: (a -> a -> a) -> Product f g a -> Product f g a -> Product f g a #

liftI2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(Additive f, Additive g) => Additive (Compose f g) 
Instance details

Defined in Linear.Vector

Methods

zero :: Num a => Compose f g a #

(^+^) :: Num a => Compose f g a -> Compose f g a -> Compose f g a #

(^-^) :: Num a => Compose f g a -> Compose f g a -> Compose f g a #

lerp :: Num a => a -> Compose f g a -> Compose f g a -> Compose f g a #

liftU2 :: (a -> a -> a) -> Compose f g a -> Compose f g a -> Compose f g a #

liftI2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

class Num a => Epsilon a where #

Provides a fairly subjective test to see if a quantity is near zero.

>>> nearZero (1e-11 :: Double)
False
>>> nearZero (1e-17 :: Double)
True
>>> nearZero (1e-5 :: Float)
False
>>> nearZero (1e-7 :: Float)
True

Methods

nearZero :: a -> Bool #

Determine if a quantity is near zero.

Instances

Instances details
Epsilon Double
abs a <= 1e-12
Instance details

Defined in Linear.Epsilon

Methods

nearZero :: Double -> Bool #

Epsilon Float
abs a <= 1e-6
Instance details

Defined in Linear.Epsilon

Methods

nearZero :: Float -> Bool #

Epsilon CFloat
abs a <= 1e-6
Instance details

Defined in Linear.Epsilon

Methods

nearZero :: CFloat -> Bool #

Epsilon CDouble
abs a <= 1e-12
Instance details

Defined in Linear.Epsilon

Methods

nearZero :: CDouble -> Bool #

(Epsilon a, RealFloat a) => Epsilon (Complex a) 
Instance details

Defined in Linear.Epsilon

Methods

nearZero :: Complex a -> Bool #

Epsilon a => Epsilon (Plucker a) 
Instance details

Defined in Linear.Plucker

Methods

nearZero :: Plucker a -> Bool #

(RealFloat a, Epsilon a) => Epsilon (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

nearZero :: Quaternion a -> Bool #

Epsilon (V0 a) 
Instance details

Defined in Linear.V0

Methods

nearZero :: V0 a -> Bool #

Epsilon a => Epsilon (V4 a) 
Instance details

Defined in Linear.V4

Methods

nearZero :: V4 a -> Bool #

Epsilon a => Epsilon (V3 a) 
Instance details

Defined in Linear.V3

Methods

nearZero :: V3 a -> Bool #

Epsilon a => Epsilon (V2 a) 
Instance details

Defined in Linear.V2

Methods

nearZero :: V2 a -> Bool #

Epsilon a => Epsilon (V1 a) 
Instance details

Defined in Linear.V1

Methods

nearZero :: V1 a -> Bool #

Epsilon (f a) => Epsilon (Point f a) 
Instance details

Defined in Linear.Affine

Methods

nearZero :: Point f a -> Bool #

(Dim n, Epsilon a) => Epsilon (V n a) 
Instance details

Defined in Linear.V

Methods

nearZero :: V n a -> Bool #

class Num a => Conjugate a where #

An involutive ring

Minimal complete definition

Nothing

Methods

conjugate :: a -> a #

Conjugate a value. This defaults to the trivial involution.

>>> conjugate (1 :+ 2)
1.0 :+ (-2.0)
>>> conjugate 1
1

Instances

Instances details
Conjugate Double 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Double -> Double #

Conjugate Float 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Float -> Float #

Conjugate Int 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Int -> Int #

Conjugate Int8 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Int8 -> Int8 #

Conjugate Int16 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Int16 -> Int16 #

Conjugate Int32 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Int32 -> Int32 #

Conjugate Int64 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Int64 -> Int64 #

Conjugate Integer 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Integer -> Integer #

Conjugate Word 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Word -> Word #

Conjugate Word8 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Word8 -> Word8 #

Conjugate Word16 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Word16 -> Word16 #

Conjugate Word32 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Word32 -> Word32 #

Conjugate Word64 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Word64 -> Word64 #

Conjugate CFloat 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: CFloat -> CFloat #

Conjugate CDouble 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: CDouble -> CDouble #

(Conjugate a, RealFloat a) => Conjugate (Complex a) 
Instance details

Defined in Linear.Conjugate

Methods

conjugate :: Complex a -> Complex a #

(Conjugate a, RealFloat a) => Conjugate (Quaternion a) 
Instance details

Defined in Linear.Quaternion

Methods

conjugate :: Quaternion a -> Quaternion a #

Conjugate (S a Word) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

conjugate :: S a Word -> S a Word #

Conjugate (S a Int) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

conjugate :: S a Int -> S a Int #

Conjugate (S a Float) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

Methods

conjugate :: S a Float -> S a Float #

class Conjugate a => TrivialConjugate a #

Requires and provides a default definition such that

conjugate = id

Instances

Instances details
TrivialConjugate Double 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Float 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Int 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Int8 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Int16 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Int32 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Int64 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Integer 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Word 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Word8 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Word16 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Word32 
Instance details

Defined in Linear.Conjugate

TrivialConjugate Word64 
Instance details

Defined in Linear.Conjugate

TrivialConjugate CFloat 
Instance details

Defined in Linear.Conjugate

TrivialConjugate CDouble 
Instance details

Defined in Linear.Conjugate

TrivialConjugate (S a Word) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

TrivialConjugate (S a Int) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

TrivialConjugate (S a Float) Source # 
Instance details

Defined in Graphics.GPipe.Internal.Expr

getLinear :: (Binary a, Applicative t, Traversable t) => Get (t a) #

Deserialize a linear type.

putLinear :: (Binary a, Foldable t) => t a -> Put #

Serialize a linear type.