TAN in JS
Description
Function that returns the tangent of an angle in radians. (JavaScript TAN function Documentation).
Sample Source Pattern
Syntax
Math.tan( expression )
Arguments
expression
: Angle in radians as a numeric expression.
Return Type
Same data type sent through parameter as a numeric expression.
Examples
CREATE OR REPLACE FUNCTION compute_tan(angle float)
RETURNS float
LANGUAGE JAVASCRIPT
AS
$$
return Math.tan(ANGLE);
$$
;
SELECT COMPUTE_TAN(PI());
Last updated
Was this helpful?