##### Ninja Library - Matrix Function

# njTranslate

Applies a matrix that gives parallel movement along each axis

### FORMAT

`

  void njTranslate(*m, x, y, z)
  NJS_MATRIX *m
  Float x
  Float y
  Float z

`

### PARAMETER

  `*m` | Destination matrix
  `x` | Amount of movement along the X axis
  `y` | Amount of movement along the Y axis
  `z` | Amount of movement along the Z axis

### RETURN

  None

### DESCRIPTION

  Applies a matrix that gives parallel movement along each axis to the matrix m. When parameter m is NULL, the current matrix will be moved.

### EXAMPLE

      The following applies a matrix that gives parallel movement of 10 along the X axis,
      20 along the Y axis, and 30 along the Z axis to the current matrix.

      NJS_MATRIX stack[10];
      NJS_VIEW view;
      njInitMatrix(stack, 10);
      njInitView(&view);
      njSetView(&view);
      njClearMatrix();
      njPushMatrix(NULL);
      njTranslate(NULL, 10.f, 20.f, 30.f);
      njPopMatrix(1);

### NOTE

  For matrix [M] and matrix translated through multiplication [T],[M] = [T] * [M]. Care must be taken with the order in which matrices are multiplied.

njTranslate

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999