---
title: "getAngleTo"
canonical: "https://help.vicon.com/space/Shogun17/13536491/getAngleTo"
format: markdown
---
# Description

Returns the angle between two vectors, in degrees.

## Functional area

Math

# Command syntax

## Syntax

|  |
| --- |
| `getAngleTo vector1 vector2` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `vector1` | vector | yes | This is an (unordered) input vector in getAngleTo |
| `vector2` | vector | yes | This is an (unordered) input vector in getAngleTo |

### Flags

None

## Return value

float

Returns the absolute value of the angle between vector1 and vector2

## Examples

```plaintext
vector $v1 = <<1, 0, 0>>;
vector $v2 = <<0, 1, 0>>;
// show that getAngleTo returns the absolute value of the angle 
// between two orthogonal vectors (90 degrees) regardless of
// ordering between vector1 and vector2
print( getAngleTo($v1, $v2)) ;
print( getAngleTo($v2, $v1)) ;
```

> Macro (scroll-pagebreak)

# Additional information

## Related commands

- [cross](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537613)
- [dot](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536487)
- [getLength](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536603)
- [normalize](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537078)
- [setLength](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537112)