Oihana PHP Arango

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
example
use function oihana\arango\db\functions\numerics\degrees;

$expr = degrees(1.5707963267948966);
// Produces: 'DEGREES(1.5707963267948966)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#degrees
radians()

For converting degrees to radians.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results