# Arc Tangent 2

## Overview

![The Arc Tangent 2 Node.](/files/VCQNFKehOLafsuaGIK59)

The **Arc Tangent 2** **Node** takes two **Float** values, $$y$$ and $$x$$, and returns $$atan2(y,x)$$. The result can be obtained in degrees (°) or radians (rad).

The function $$atan2(y,x)$$ is of common use in computer science and can be equivalently defined as:

* The angle $$\theta$$ in the *Euclidean plane* between the positive $$X$$ axis and the ray connecting the origin and the point $$(x,y)$$.
* The phase $$\theta$$ of the complex number $$x+iy$$. That is, the angle $$\theta \in (-\pi, \pi]$$ such that $$x=r\cos\theta$$ and $$y=r\sin\theta$$, where $$r=\sqrt{x^2+y^2}$$.

[**Scope**](/incari-studio/2023.1/toolbox/overview.md#scopes): **Project**, **Scene**, **Function**, **Prefab**.

## Attributes

![The Arc Tangent 2 Node Attributes.](/files/nTPeb5nvTnLBWbr9c8BK)

#### Miscellaneous

| Attribute         | Type      | Description                                                                     |
| ----------------- | --------- | ------------------------------------------------------------------------------- |
| `Is Degree`       | **Bool**  | Determines whether the `Output` value is given in degrees (°) or radians (rad). |
| `Default Value y` | **Float** | The default value of `y`, if no value is provided in the **Input** **Socket**.  |
| `Default Value x` | **Float** | The default value of `x`, if no value is provided in the **Input Socket**.      |

## Inputs

| Input             | Type      | Description                                                           |
| ----------------- | --------- | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse** | A standard **Input Pulse**, to trigger the execution of the **Node**. |
| `y`               | **Float** | The $$y$$ input value.                                                |
| `x`               | **Float** | The $$x$$ input value.                                                |

## Outputs

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `Output`           | **Float** | The value of $$atan2(y,x)$$, either in degrees (°) or radians (rad), according to the `Is Degree` **Attribute**.                       |

## See Also

* [**Trigonometry**](/incari-studio/2023.1/toolbox/math/trigonometry.md)
* [**Radian-Degree Converter**](/incari-studio/2023.1/toolbox/math/trigonometry/radian-degree-converter.md)

## External Links

* [*atan2*](https://en.wikipedia.org/wiki/Atan2) on Wikipedia.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/2023.1/toolbox/math/trigonometry/arc-tangent2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
