DEGREES
Descriptionβ
Input a double-precision floating-point number and convert it from radians to degrees.
- When the parameter is NULL, return NULL.
Syntaxβ
DEGREES(<a>)
Parametersβ
parameter | explain |
---|---|
<a> | The value that needs to be converted from radians to degrees. |
Return Valueβ
The angle of parameter a.
- When the parameter is NULL, return NULL.
Examplesβ
select degrees(3.14),degrees(1),degrees(-1),degrees(NULL)
+-------------------------------+----------------------------+-----------------------------+---------------+
| degrees(cast(3.14 as DOUBLE)) | degrees(cast(1 as DOUBLE)) | degrees(cast(-1 as DOUBLE)) | degrees(NULL) |
+-------------------------------+----------------------------+-----------------------------+---------------+
| 179.9087476710785 | 57.29577951308232 | -57.29577951308232 | NULL |
+-------------------------------+----------------------------+-----------------------------+---------------+