---
title: "getAngleTo"
canonical: "https://help.vicon.com/space/ShogunPost120/1043040898/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

> Macro (scroll-pagebreak)

## 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)) ;
```

# Additional information

## Related commands

- [cross](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost120/pages/1043038367)
- [dot](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost120/pages/1043038679)
- [getLength](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost120/pages/1043038703)
- [normalize](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost120/pages/1043040362)
- [setLength](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost120/pages/1043040431)