PostgreSQL tand() 函数使用指南

PostgreSQL tand() 函数返回指定的以度为单位的数值的正切。

tand() 语法

这里是 PostgreSQL tand() 函数的语法:

tand(number)

参数

number
必需的。 一个用于计算正切的数值,以度为单位。

返回值

PostgreSQL tand() 函数返回指定度数的正切。

如果参数 number 为 NULL,tand() 函数将会返回 NULL。

tand() 示例

这里有几个 tand() 函数的示例。

SELECT
    tand(0) AS "tand(0)",
    tand(15) AS "tand(15)",
    tand(30) AS "tand(30)",
    tand(60) AS "tand(60)",
    tand(90) AS "tand(90)",
    tand(180) AS "tand(180)";
-[ RECORD 1 ]------------------
tand(0)   | 0
tand(15)  | 0.26794919243112275
tand(30)  | 0.5773502691896257
tand(60)  | 1.7320508075688774
tand(90)  | Infinity
tand(180) | 0