---
name: "apply_matrix"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/apply_matrix"
---

# apply\_matrix(3alleg)

Multiplies a point by a transformation matrix. Allegro game programming library.

## NAME

apply\_matrix, apply\_matrix\_f - Multiplies a point by a transformation matrix. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void apply\_matrix(const MATRIX \*m, fixed x, y, z, \*xout, \*yout, \*zout);**

**void apply\_matrix\_f(const MATRIX\_f \*m, float x, y, z, \*xout, \*yout, \*zout);**

## DESCRIPTION

Multiplies the point (x, y, z) by the transformation matrix m, storing  the result in (\*xout, \*yout, \*zout).

## SEE ALSO

[**matrix\_mul**(3alleg)](/matrix_mul/3alleg.md), [**ex12bit**(3alleg)](/ex12bit/3alleg.md), [**ex3d**(3alleg)](/ex3d/3alleg.md), [**exstars**(3alleg)](/exstars/3alleg.md)
