PI in JS
Description
Constant which represents the PI number (approximately 3.141592...) (JavaScript PI Documentation).
Sample Source Pattern
Syntax
Math.PIExamples
CREATE OR REPLACE FUNCTION circumference(radius float)
RETURNS float
LANGUAGE JAVASCRIPT
AS
$$
function circumference(r){
return 2 * Math.PI * r;
}
return circumference(RADIUS);
$$
;
SELECT CIRCUMFERENCE(2); CIRCUMFERENCE(2)|
------------------+
12.566370614359172|Known Issues
No issues were found.
Related EWIs
No related EWIs.
Last updated
