simple-vec3- Three-dimensional vectors of doubles with basic operations

Safe HaskellNone




data UVec3 Source

Vec3 implementation with Unbox instance based on a single contiguous array storage scheme, suitable for use with Data.Vector.Unboxed.

Unbox instance provides the required index transformations.

 interface: [d1 x   y   z  ; d2 x   y   z  ...], length = N = M / 3
                |   |   |       |   |   |
 storage:   [  d1x d2y d2z ;   d2x d2y d2z ...], length = M

Thanks to dense packing scheme the performance of this implementation should generally be on par with Storable-based SVec3.


UVec3 !Double !Double !Double