round.php
Table of Contents
Functions
- round() : string
- Return the integer closest to the given value.
Functions
round()
Return the integer closest to the given value.
round(string|int|float $value) : string
This helper wraps the ArangoDB AQL function ROUND(value) which rounds
a number to the nearest integer using standard rounding rules.
Example AQL usage:
ROUND(4.1) // returns 4
ROUND(4.5) // returns 5
ROUND(4.9) // returns 5
ROUND(doc.price) // rounds the price to nearest integer
Parameters
- $value : string|int|float
-
Any number to round to nearest integer.
Tags
Return values
string —The formatted AQL expression.