MySQL 中 DEGREES(X) 函数用来返回参数 X,从弧度转换为度数。
DEGREES(X)
X 待转换的弧度
(1)将弧度 PI() 转换成度数,如下:
mysql> SELECT PI(), DEGREES(PI()); +----------+---------------+ | PI() | DEGREES(PI()) | +----------+---------------+ | 3.141593 | 180 | +----------+---------------+ 1 row in set (0.04 sec) mysql> SELECT PI(), DEGREES(PI() / 2); +----------+-------------------+ | PI() | DEGREES(PI() / 2) | +----------+-------------------+ | 3.141593 | 90 | +----------+-------------------+ 1 row in set (0.03 sec)