# matrix_build

## Build a 4x4 matrix from the given input
values.

### Syntax:

matrix_build(x, y, z, xrotation, yrotation,
zrotation, xscale, yscale, zscale)

Argument |
Description |

x |
The x component of the translation vector. |

y |
The y component of the translation vector. |

z |
The z component of the translation vector. |

xrotation |
The angle to rotate around the x-axis. |

yrotation |
The angle to rotate around the y-axis. |

xzotation |
The angle to rotate around the z-axis. |

xscale |
The x scale amount. |

yscale |
The y scale amount. |

zscale |
The z scale amount. |

**Returns:** Array

### Description

This function can be used to create your own custom matrix and
will return an index value for this new matrix which should be
stored in a variable for future reference and use. The matrix
itself is created as 16 value 1D array where the first values are
column 1, second 4 values are column2 etc... of a 4x4 matrix.

**NOTE:** When you build a new matrix in this way the order
of operation is YXZ.

### Example:

m_array = matrix_build(x, y, 0, 0, 90, 0, 1, 2,
1);

The above code will build a new matrix transform and store the
resulting array in the variable "m_array".

##### © Copyright YoYo Games Ltd. 2015 All Rights Reserved