---
name: "s3d_vector_angle"
section: "3"
platform: "linux"
package: "s3d-doc"
version: "0.2.2.1-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/s3d_vector_angle"
---

# s3d\_vector\_angle(3)

calculate angle between two vectors

## NAME

s3d\_vector\_angle - calculate angle between two vectors

## SYNOPSIS

```
#include <s3d.h>
```

**float s3d\_vector\_angle(const float** *vector1***\[\], const float** *vector2***\[\]);**

## DESCRIPTION

Calculates and returns the angle between vector1 and vector2. Please note that the resulting angle is between 0 and PI, therefore not covering the whole period! To convert in degrees just do result\*180/M\_PI. All vectors should have the format float\[3\]. More info on wikipedia. http://en.wikipedia.org/wiki/Vector\_(spatial)

## AUTHOR

**Simon Wunderlich**

Author of s3d
