---
name: "apply_quat"
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_quat"
---

# apply\_quat(3alleg)

Multiplies a point by a quaternion. Allegro game programming library.

## NAME

apply\_quat - Multiplies a point by a quaternion. Allegro game programming library.

## SYNOPSIS

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

**void apply\_quat(const QUAT \*q, float x, y, z, \*xout, \*yout, \*zout);**

## DESCRIPTION

Multiplies the point (x, y, z) by the quaternion q, storing the result in  (\*xout, \*yout, \*zout). This is quite a bit slower than apply\_matrix\_f(),  so only use it to translate a few points. If you have many points, it is  much more efficient to call quat\_to\_matrix() and then use  apply\_matrix\_f().
