Number to convert into it arc cosine value.
acos
acos(angle: Number): Number | NaN
Returns an arc cosine value that can range from 0.0
through pi.
If the absolute value of the input is greater than 1
,
the result is null
.
Introduced in DataWeave version 2.4.0.
Parameters
Name | Description |
---|---|
|
Example
This example shows how acos
behaves with different inputs.
Source
%dw 2.0
import * from dw::util::Math
output application/json
---
{
"acos0": acos(0),
"acos13": acos(0.13),
"acos-1": acos(-1),
"acos1": acos(1),
"acos1.1": acos(1.1)
}
DataWeave
Output
{
"acos0": 1.5707963267948966,
"acos13": 1.440427347091751,
"acos-1": 3.141592653589793,
"acos1": 0.0,
"acos1.1": null
}
Json