Computes the angle in radians whose cosine is a given number. The resulting radians will be in the range [0, π]. If the result is needed in degrees (range [0ΒΊ, 180ΒΊ]), you can convert it using the degrees() function.
| Syntax | acos(<num>) | ||
| Arguments | Name | Type | Description |
<num> | Numeric | The cosine value in the range of [-1,1] | |
| Return Type | DOUBLE | ||
UQLreturn acos(0.5) * 180 / pi() as degree
Result:
| degree |
|---|
| 60 |
Computes the angle in radians whose sine is a given number. The resulting radians will be in the range [-π/2, π/2]. If the result is needed in degrees (range [-90ΒΊ, 90ΒΊ]), you can convert it using the degrees() function.
| Syntax | asin(<num>) | ||
| Arguments | Name | Type | Description |
<num> | Numeric | The sine value in the range of [-1,1] | |
| Return Type | DOUBLE | ||
UQLreturn asin(0.5) * 180 / pi() as degree
Result:
| degree |
|---|
| 30 |
Computes the angle in radians whose tangent is a given number. The resulting radians will be in the range [-π/2, π/2]. If the result is needed in degrees (range [-90ΒΊ, 90ΒΊ]), you can convert it using the degrees() function.
| Syntax | atan(<num>) | ||
| Arguments | Name | Type | Description |
<num> | Numeric | The tangent value | |
| Return Type | DOUBLE | ||
UQLreturn atan(1) * 180 / pi() as degree
Result:
| degree |
|---|
| 45 |
Computes the cosine of an angle expressed in radians. The output will be in the range [-1, 1]. If the angle is in degrees, you can convert it to radians using the radians() function.
| Syntax | cos(<radians>) | ||
| Arguments | Name | Type | Description |
<radians> | Numeric | The angle expressed in radian | |
| Return Type | DOUBLE | ||
UQLreturn cos(60 * pi() / 180)
Result:
| cos(60 * pi() / 180) |
|---|
| 0.5 |
Computes the cotangent of an angle expressed in radians. The output will be in the range (ββ, β1] βͺ [1, +β). If the angle is in degrees, you can convert it to radians using the radians() function.
| Syntax | cot(<radians>) | ||
| Arguments | Name | Type | Description |
<radians> | Numeric | The angle expressed in radian; cot(0) is undefined | |
| Return Type | DOUBLE | ||
UQLreturn cot(45 * pi() / 180)
Result:
| cot(45 * pi() / 180) |
|---|
| 1 |
Computes the sine of an angle expressed in radians. The output will be in the range [-1, 1]. If the angle is in degrees, you can convert it to radians using the radians() function.
| Syntax | sin(<radians>) | ||
| Arguments | Name | Type | Description |
<radians> | Numeric | The angle expressed in radian | |
| Return Type | DOUBLE | ||
UQLreturn sin(30 * pi() / 180)
Result:
| sin(30 * pi() / 180) |
|---|
| 0.5 |
Computes the tangent of an angle expressed in radians. The output will be in the range (ββ, +β). If the angle is in degrees, you can convert it to radians using the radians() function.
| Syntax | tan(<radians>) | ||
| Arguments | Name | Type | Description |
<radians> | Numeric | The angle expressed in radian | |
| Return Type | DOUBLE | ||
UQLreturn tan(45 * pi() / 180)
Result:
| tan(45 * pi() / 180) |
|---|
| 1 |