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

# dot\_product(3alleg)

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**(3alleg)](/cross_product/3alleg.md), [**normalize\_vector**(3alleg)](/normalize_vector/3alleg.md), [**exstars**(3alleg)](/exstars/3alleg.md)
