vect-0.4.7: A low-dimensional linear algebra library, tailored to computer graphics.

Data.Vect.Float.Instances

Contents

Description

Eq, Num and Fractional instances for vectors and matrices. These make writing code much more convenient, but also much more dangerous; thus you have to import this module explicitely.

In the case of Vector instances, all operations are pointwise (including multiplication and division), and scalars are implicitly converted to vectors so that all components of the resulting vectors are the equal to the given scalar. This gives a set of consistent instances.

In the case of Matrices, multiplication is usual matrix multiplication, division is not implemented, and scalars are converted to diagonal matrices.

abs and signum are implemented to be normalize and norm (in the case of matrices, Frobenius norm).

Synopsis

Vectors

Matrices