# Atan

## Syntax

The syntax of the Power Fx Atan function is as follows:

``` Atan(x) ```

Here, the ‘x’ is the input parameter for which the inverse tangent needs to be calculated.

## Example

Let’s see an example of how to use the Power Fx Atan function in Power Apps.

Suppose we have a slider control named ‘Slider1’ and a label control named ‘Label1’. We want to display the inverse tangent of the value selected on the slider control in the label control.

We can use the following formula in the Text property of the label control:

``` Text = Atan(Slider1.Value) ```

This formula will calculate the inverse tangent of the value selected on the slider control and display it in the label control.

## Use Cases

The Power Fx Atan function can be used in various scenarios in Power Apps. Let’s discuss some of the use cases below:

### To calculate the angle of inclination

The Power Fx Atan function can be used to calculate the angle of inclination. The angle of inclination is the angle between a line and the x-axis. Suppose we have the coordinates (x, y) of a point. We can calculate the angle of inclination by using the following formula:

``` Angle = Atan(y / x) ```

Here, the ‘x’ and ‘y’ are the coordinates of the point.

### To calculate the direction of a vector

The Power Fx Atan function can also be used to calculate the direction of a vector. Suppose we have a vector with the components ‘x’ and ‘y’. We can calculate the direction of the vector by using the following formula:

``` Direction = Atan(y / x) ```

Here, the ‘x’ and ‘y’ are the components of the vector.

### To calculate the bearing between two points

The Power Fx Atan function can be used to calculate the bearing between two points. The bearing is the angle between the line connecting two points and the north direction. Suppose we have two points with the coordinates (x1, y1) and (x2, y2). We can calculate the bearing between these two points by using the following formula:

``` Bearing = Atan((x2 - x1) / (y2 - y1)) ```

Here, the ‘x1’, ‘y1’, ‘x2’, and ‘y2’ are the coordinates of the two points.

The Power Fx Atan function is a powerful mathematical function used in Power Apps. It can be used to calculate the inverse tangent of a given number. In this article, we discussed how to use the Power Fx Atan function in Power Apps. We also discussed some of the use cases of the function. We hope this article was helpful in understanding the Power Fx Atan function.