# GSDP:GAM100/CProcessing/mat3 t

< GSDP:GAM100 | CProcessing

# mat3_t

## Description

A mat3_t (3D matrix type) is a structure that can hold nine float values. This is used for linear algebra and transformation, but can be used for any purpose that requires nine float values. There are a series of operations that can be done using a 3D matrix that are also provided.

## Example

```
void update()
{
// create a transform and set it to initialized values
mat3_t transform = mat3();
// make the matrix a translation transform by (100, 100)
transform = mat3_translate( (vec2_t) { 100, 100 } );
// create a vec2_t position
vec2_t position;
position.x = 100;
position.y = 100;
// apply that matrix to the point and store it in the position
position = mat3_mult_vec2(transform, position);
}
```