MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / translate

Function translate

test/full_es2_sdlproc.c:343–349  ·  view source on GitHub ↗

* Translates a 4x4 matrix. * * @param[in,out] m the matrix to translate * @param x the x component of the direction to translate to * @param y the y component of the direction to translate to * @param z the z component of the direction to translate to */

Source from the content-addressed store, hash-verified

341 * @param z the z component of the direction to translate to
342 */
343static void
344translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z)
345{
346 GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 };
347
348 multiply(m, t);
349}
350
351/**
352 * Creates an identity 4x4 matrix.

Callers 2

draw_gearFunction · 0.70
gears_drawFunction · 0.70

Calls 1

multiplyFunction · 0.70

Tested by

no test coverage detected