degrees.php
Table of Contents
Functions
- degrees() : string
- Convert an angle from radians to degrees.
Functions
degrees()
Convert an angle from radians to degrees.
degrees(string|int|float $rad) : string
This helper wraps the ArangoDB AQL function DEGREES(rad) which converts
an angle from radians to degrees using the conversion factor π radians = 180 degrees.
Example AQL usage:
DEGREES(0) // returns 0
DEGREES(1.5707963267948966) // returns 90 (π/2 radians = 90 degrees)
DEGREES(3.141592653589793) // returns 180 (π radians = 180 degrees)
DEGREES(6.283185307179586) // returns 360 (2π radians = 360 degrees)
Parameters
- $rad : string|int|float
-
The input value in radians.
Tags
Return values
string —The formatted AQL expression.