1

Switching from legacy to standard, is there a standard function to convert values into radian, similar to legacy?

Typically, I would use radian() within legacy SQL, but that function doesn't exist within standard.

1
CREATE TEMP FUNCTION RADIANS(x FLOAT64) AS (
  ACOS(-1) * x / 180
);

SELECT RADIANS(37);  -- returns 0.6457718232379019
1

As a shared UDF you can use right now, fhoffa.x.radians():

SELECT fhoffa.x.radians(180)

3.141592653589793

How-to for persistent UDFs:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.