---
name: "dot_product"
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/dot_product/3alleg4"
---

# dot\_product(3alleg4)

Calculates the dot product. Allegro game programming library.

## NAME

dot\_product, dot\_product\_f - Calculates the dot product. Allegro game programming library.

## SYNOPSIS

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

**fixed dot\_product(fixed x1, y1, z1, x2, y2, z2);**

**float dot\_product\_f(float x1, y1, z1, x2, y2, z2);**

## DESCRIPTION

Calculates the dot product (x1, y1, z1) . (x2, y2, z2), returning the  result.

## SEE ALSO

**cross\_product**(3alleg4), **normalize\_vector**(3alleg4), **exstars**(3alleg4)
