ATAN in JS

Description

Function that returns the arctangent of a specified number (JavaScript ATAN function Documentation).

Sample Source Pattern

Syntax

Math.atan( expression )

Arguments

expression: Numeric expression.

Return Type

Numeric expression between π2-\frac{\pi}{2} and π2\frac{\pi}{2}.

Examples

CREATE OR REPLACE FUNCTION compute_atan(a float)
  RETURNS float
  LANGUAGE JAVASCRIPT
AS
$$
  return Math.atan(A);
$$
;
SELECT COMPUTE_ATAN(-30);

Last updated