---
name: "apply_quat"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/apply_quat/3alleg4"
---

# apply\_quat(3alleg4)

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().
