DEGREES
All functions > MATH > DEGREES
Returns the angle in degrees for the given angle in radians.
Signatures
Returns: Angle in degrees
DEGREES(radians: T) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
radians | T | Yes | Angle in radians to convert |
Notes
- Conversion formula:
degrees = radians * (180 / π) - π radians = 180 degrees
- 2π radians = 360 degrees
- Returns NULL if the input is NULL
- Opposite of RADIANS function
Examples
FeatureQL
SELECT
f1 := DEGREES(0.0e0), -- Zero radians
f2 := DEGREES(1.5707963267948966e0), -- π/2 radians = 90 degrees
f3 := DEGREES(3.141592653589793e0), -- π radians = 180 degrees
f4 := DEGREES(6.283185307179586e0), -- 2π radians = 360 degrees
f5 := DEGREES(-1.5707963267948966e0) -- Negative π/2 = -90 degrees
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR | f5 VARCHAR |
|---|---|---|---|---|
| 0.0 | 90.0 | 180.0 | 360.0 | -90.0 |
On this page