iOS Vector and Matrix Math: Part 2

Continuing on from my previous post iOS Vector and Matrix Math. I have managed to use matrix multiplication to transform a vector.

Vector Transform

Transforms a vector by a matrix

float matrix[16] =
{
	1.0f, 2.0f, 3.0f, 4.0f,
	7.0f, 6.0f, 9.0f, 10.0f,
	11.0f, 12.0f, 13.0f, 14.0f,
	15.0f, 16.0f, 17.0f, 18.0f
};
float vectorIn[4] = { 1.0f, 1.0f, 0.0f, 1.0f };
float vectorOut[4];
 
vDSP_mmul( &vectorIn[0], 1, &matrix[0], 1, &vectorOut[0], 1, 1, 4, 4 );