citro3d/source/maths/mtx_translate.c
2014-12-20 21:34:19 +01:00

15 lines
226 B
C

#include <c3d/maths.h>
void Mtx_Translate(C3D_Mtx* mtx, float x, float y, float z)
{
C3D_Mtx tm, om;
Mtx_Identity(&tm);
tm.r[0].w = x;
tm.r[1].w = y;
tm.r[2].w = z;
Mtx_Multiply(&om, &tm, mtx);
Mtx_Copy(mtx, &om);
}