PostgreSQL 13.7でラジアン数から角度を求めるサンプル

環境
Windows 11 64bit Pro
PostgreSQL 13.7

関数1
degrees(dp)
ラジアン数から角度を求めます。
戻り値型 dp
説明  ラジアンに対応する度

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select degrees(0.5) result;
result
-------------------
28.64788975654116
(1)
postgres=# select degrees(0.5) result; result ------------------- 28.64788975654116 (1 行)
postgres=# select degrees(0.5) result;
      result
-------------------
 28.64788975654116
(1 行)

関数2
radians(dp)
角度からラジアンを求めます。
戻り値型 dp
説明  度に対応するラジアン
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select radians(45.0) result;
result
--------------------
0.7853981633974483
(1)
postgres=# select radians(45.0) result; result -------------------- 0.7853981633974483 (1 行)
postgres=# select radians(45.0) result;
       result
--------------------
 0.7853981633974483
(1 行)

 

PostgreSQL

Posted by arkgame