Oihana PHP Arango

sin.php

Table of Contents

Functions

sin()  : string
Return the sine of a value.

Functions

sin()

Return the sine of a value.

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

This helper wraps the ArangoDB AQL function SIN(value) which returns the sine of a value in radians.

Example AQL usage:

SIN(0)                  // returns 0
SIN(1.5707963267948966) // returns 1 (sin(π/2))
SIN(3.141592653589793)  // returns 0 (sin(π))
SIN(doc.angle)          // returns sine of the angle
Parameters
$value : string|int|float

The input value in radians.

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

$expr = sin(0);
// Produces: 'SIN(0)'
see
https://docs.arangodb.com/stable/aql/functions/numeric/#sin
asin()

For the arcsine function.

cos()

For the cosine function.

tan()

For the tangent function.

since
1.0.0
author

Marc Alcaraz

Return values
string —

The formatted AQL expression.

On this page

Search results