CRM Crate

# Calculate trigonometric values using Power FX formulas in Power Apps

We will learn to calculate trigonometric values using Power FX formulas in Power Apps. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Apps.

## What is Power FX?

Microsoft’s Power Fx is the low-code language that will be used across Power Platform. It’s a strong-typed, general-purpose, declarative, and functional programming language. Power Fx is expressed in user-friendly text. It’s a low-code language that citizen developers & makers can work with directly in an Excel-like formula bar or Visual Studio Code text window.

It enables a complete range of development from no-code for those who have never programmed before to “pro-code” for the seasoned professional, with no learning or rewriting cliffs in between, enabling diverse teams to collaborate and save time and expense.

## Understanding Cos () function

The Cos function returns the cosine of its argument, an angle specified in radians.

Cos( 1.047197 )

Returns the cosine of 1.047197 radians or 60 degrees. The result is “0.5”.

## Understanding Cot() function

The Cot function returns the cotangent of its argument, an angle specified in radians.

Cot( Pi()/4 )

Returns the cotangent of 0.785398… radians or 45 degrees. The result is “1”.

## Understanding Sin() function

The Sin function returns the sine of its argument, an angle specified in radians.

Sin( Pi()/2 )

Returns the sine of 1.570796… radians or 90 degrees. The result is “1”.

## Understanding Tan() function

The Tan function returns the tangent of its argument, an angle specified in radians.

Returns the tangent of 1.047197… radians or 60 degrees. The result is “1.732050…”.

## Understanding Acos () function

Acos( Number )

The Acos function returns the arccosine, or inverse cosine, of its argument. The arccosine is the angle whose cosine is the argument. The returned angle is given in radians in the range 0 (zero) to π.

Acos( 0.5 )

Returns the arccosine of 0.5, in radians. The result is “1.047197…”.

## Understanding Acot () function

Acot( Number )

The Acot function returns the principal value of the arccotangent, or inverse cotangent, of its argument. The returned angle is given in radians in the range 0 (zero) to π.

Acot( 1 )

Returns the arccotangent of 1, in radians. The result is “0.785398…”.

## Understanding Asin () function

Asin( Number )

The Asin function returns the arcsine, or inverse sine, of its argument. The arcsine is the angle whose sine is the argument. The returned angle is given in radians in the range -π/2 to π/2.

Asin( 1 )

Returns the arcsine of 1, in radians. The result is “1.570796…”.

## Understanding Atan () function

Atan( Number )

The Atan function returns the arctangent, or inverse tangent, of its argument. The arctangent is the angle whose tangent is the argument. The returned angle is given in radians in the range -π/2 to π/2.

Atan( 1.732050 )

Returns the arctangent of 1.732050, in radians. The result is “1.047197…”.

## Understanding Atan2 () function

Atan2 ( Number )

The Atan2 function returns the arctangent, or inverse tangent, of the specified x and y coordinates as arguments. The arctangent is the angle from the x-axis to a line that contains the origin (0, 0) and a point with coordinates (xy). The angle is given in radians between -π and π, excluding -π. A positive result represents a counterclockwise angle from the x-axis; a negative result represents a clockwise angle. Atan2( ab ) equals Atan( b/a ), except that a can equal 0 (zero) with the Atan2 function.

Atan2( 5, 3 )

Returns the arctangent of the angle from the x-axis of the line that contains the origin (0,0) and the coordinate (5,3), which is approximately 31 degrees. The result is “0.540419…”.

## Understanding Degree () function

The Degrees function converts radians to degrees. π radians equals 180 degrees.

Degrees( 1.047197 )

Returns the equivalent number of degrees for 1.047197 radians. The result is “60”.

## Understanding Pi() function

Pi()

This function provides a value equivalent to π.

Pi()

Returns the transcendental number π. The result is “3.141592…”.

## Understanding Radians() function

The Radians function converts degrees to radians.

Returns the equivalent number of radians for 15 degrees. The result is “0.261799…”.

## Implementation of the above given Power FX formulas in Power Apps

The above Power FX formula implementation is demonstrated in the below given animation.

### Thus, we learned to calculate trigonometric values using Power FX formulas in Power Apps.

Article Rating
Subscribe
Notify of 