simple-vec3-0.1.0.0: Three-dimensional vectors of doubles with basic operations, supporting Unbox and Storable class

Safe HaskellNone

Data.Vec3.TUnboxed

Synopsis

Documentation

newtype TUVec3 Source

Vec3 implementation with Unbox instance based on tuples, suitable for use with Data.Vector.Unboxed.

This represents 3-vector as a triple of doubles, using the default Unbox instance for tuples as provided by Data.Vector.Unboxed, which wraps a vector of tuples as a tuple of vectors.

 interface:  [d1 (x, y, z); d2 (x, y, z) ...], length = N
                  |  |  |       |  |  |
 storage(x): [d1x-+  |  | ; d2x-+  |  |  ...], length = N
 storage(y): [d1y----+  | ; d2y----+  |  ...], length = N
 storage(z): [d1z-------+ ; d2z-------+  ...], length = N

Constructors

TUVec3 (Double, Double, Double)