Oihana PHP Arango

acos.php

Table of Contents

Functions

acos()  : string
Return the arccosine of a value.

Functions

acos()

Return the arccosine of a value.

acos(string|int|float $value) : string

This helper wraps the ArangoDB AQL function ACOS(value) which returns the arccosine (inverse cosine) of a value in radians. The value must be between -1 and 1 (inclusive), otherwise it returns null.

Example AQL usage:

ACOS(1)  // returns 0
ACOS(0)  // returns 1.5707963267948966 (π/2)
ACOS(-1) // returns 3.141592653589793 (π)
ACOS(2)  // returns null (out of range)
Parameters
$value : string|int|float

The input value (must be between -1 and 1).

Tags
example
use function oihana\arango\db\functions\numerics\acos;

$expr = acos(0.5);
// Produces: 'ACOS(0.5)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#acos
cos()

For the cosine function.

asin()

For the arcsine function.

atan()

For the arctangent function.

since
1.0.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results