# simd

Perform computations on small vectors and matrices.

## Overview

simd provides types and functions for small vector and matrix computations. The types include integer and floating-point vectors and matrices, and the functions provide basic arithmetic operations, element-wise mathematical operations, and geometric and linear algebra operations.

simd supports vectors containing up to 16 elements (for single-precision values) or 8 elements (for double-precision values), and matrices up to 4 x 4 elements in size. Other frameworks, such as vForce, allow you to work with larger vectors.

## Topics

### First Steps

Working with Vectors

Use vectors to calculate geometric values, calculate dot products and cross products, and interpolate between values.

Working with Matrices

Solve simultaneous equations and transform points in space.

Working with Quaternions

Rotate points around the surface of a sphere, and interpolate between them.

### Vectors: 32-Bit Signed Integer Values

`typealias simd_int2`

A vector of two 32-bit signed integer values.

`typealias simd_int3`

A vector of three 32-bit signed integer values.

`typealias simd_int4`

A vector of four 32-bit signed integer values.

### Vectors: 32-Bit Unsigned Integer Values

`typealias simd_uint2`

A vector of two 32-bit unsigned integer values.

`typealias simd_uint3`

A vector of three 32-bit unsigned integer values.

`typealias simd_uint4`

A vector of four 32-bit unsigned integer values.

### Vectors: Single-Precision Values

`typealias simd_float2`

A vector of two 32-bit single-precision values.

`typealias simd_float3`

A vector of three 32-bit single-precision values.

`typealias simd_float4`

A vector of four 32-bit single-precision values.

### Vectors: Double-Precision Values

`typealias simd_double2`

A vector of two 64-bit double-precision values.

`typealias simd_double3`

A vector of three 64-bit double-precision values.

`typealias simd_double4`

A vector of four 64-bit double-precision values.

### Matrices: Single-Precision Values

`struct simd_float2x2`

A matrix of two columns and two rows containing single-precision values.

`struct simd_float3x2`

A matrix of three columns and two rows containing single-precision values.

`struct simd_float4x2`

A matrix of four columns and two rows containing single-precision values.

`struct simd_float2x3`

A matrix of two columns and three rows containing single-precision values.

`struct simd_float3x3`

A matrix of three columns and three rows containing single-precision values.

`struct simd_float4x3`

A matrix of four columns and three rows containing single-precision values.

`struct simd_float2x4`

A matrix of two columns and four rows containing single-precision values.

`struct simd_float3x4`

A matrix of three columns and four rows containing single-precision values.

`struct simd_float4x4`

A matrix of four columns and four rows containing single-precision values.

### Matrices: Double-Precision Values

`struct simd_double2x2`

A matrix of two columns and two rows containing double-precision values.

`struct simd_double3x2`

A matrix of three columns and two rows containing double-precision values.

`struct simd_double4x2`

A matrix of four columns and two rows containing double-precision values.

`struct simd_double2x3`

A matrix of two columns and three rows containing double-precision values.

`struct simd_double3x3`

A matrix of three columns and three rows containing double-precision values.

`struct simd_double4x3`

A matrix of four columns and three rows containing double-precision values.

`struct simd_double2x4`

A matrix of two columns and four rows containing double-precision values.

`struct simd_double3x4`

A matrix of three columns and four rows containing double-precision values.

`struct simd_double4x4`

A matrix of four columns and four rows containing double-precision values.

### Quaternions

Rotating a Cube by Transforming Its Vertices

Rotate a cube through a series of keyframes using quaternion interpolation to transition between them.

`struct simd_quatf`

A single-precision quaternion.

`struct simd_quatd`

A double-precision quaternion.