「MariaDB」DEGREES関数でラジアン値から角度を求める
環境
MariaDB 10.6.4
書式
DEGREES(ラジアン値)
DEGREES関数を使用してラジアン値から角度を求めます。
使用例1
ラジアン値(2 * PI( ))から角度を求めます。
SQL構文
SELECT DEGREES( 2 * PI( ) ) result
実行結果
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result;
+--------+
| result |
+--------+
| 360 |
+--------+
1 row in set (0.045 sec)
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result;
+--------+
| result |
+--------+
| 360 |
+--------+
1 row in set (0.045 sec)
MariaDB [testdb]> SELECT DEGREES( 2 * PI( ) ) result; +--------+ | result | +--------+ | 360 | +--------+ 1 row in set (0.045 sec)
使用例2
ラジアン値(PI( ))から角度を求めます。
SQL構文
SELECT DEGREES( PI( ) ) result
実行結果
MariaDB [testdb]> SELECT DEGREES( PI( ) ) result;
+--------+
| result |
+--------+
| 180 |
+--------+
1 row in set (0.000 sec)
MariaDB [testdb]> SELECT DEGREES( PI( ) ) result;
+--------+
| result |
+--------+
| 180 |
+--------+
1 row in set (0.000 sec)
MariaDB [testdb]> SELECT DEGREES( PI( ) ) result; +--------+ | result | +--------+ | 180 | +--------+ 1 row in set (0.000 sec)