---
name: "get_align_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/get_align_matrix"
---

# get\_align\_matrix(3alleg)

Rotates a matrix to align it along specified coordinate vectors. Allegro game programming library.

## NAME

get\_align\_matrix - Rotates a matrix to align it along specified coordinate vectors. Allegro game programming library.

## SYNOPSIS

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

**void get\_align\_matrix(MATRIX \*m, fixed xfront, yfront, zfront,** **fixed xup, fixed yup, fixed zup);**

## DESCRIPTION

Rotates a matrix so that it is aligned along the specified coordinate  vectors (they need not be normalized or perpendicular, but the up and  front must not be equal). A front vector of 0,0,-1 and up vector of 0,1,0  will return the identity matrix.

## SEE ALSO

[**apply\_matrix**(3alleg)](/apply_matrix/3alleg.md), [**get\_camera\_matrix**(3alleg)](/get_camera_matrix/3alleg.md)
