Contact Us 1-800-596-4880

atan

atan(angle: Number): Number

Returns an arc tangent value that can range from -pi/2 through pi/2.

Introduced in DataWeave version 2.4.0.

Parameters

Name Description

angle

Number to convert into its arc tangent value.

Example

This example shows how atan behaves with different inputs.

Source

%dw 2.0
import * from dw::util::Math
output application/json
---
{
  "atan0":  atan(0),
  "atan13": atan(0.13),
  "atan-1": atan(-1)
}

Output

{
   "atan0": 0.0,
   "atan13": 0.12927500404814307,
   "atan-1": -0.7853981633974483
}