math.roundtoeven() function
The math.roundtoeven()
function returns the nearest integer, rounding ties to even.
Output data type: Float
import "math"
math.roundtoeven(x: 3.14)
// Returns 3.0
math.roundtoeven(x: 3.5)
// Returns 4.0
Parameters
x
The value used in the operation.
Data type: Float
Special cases
math.roundtoeven(x: ±0) // Returns ±0
math.roundtoeven(x: ±Inf) // Returns ±Inf
math.roundtoeven(x: NaN) // Returns NaN
Bug Reports and Feedback
Thank you for being willing to help test InfluxDB v2.0 alpha! Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation. Submit feedback using one of the following methods:
- Post in the InfluxData Community
- In the InfluxDB UI, click Feedback in the left navigation bar.
- Submit documentation issues to the InfluxDB 2.0 documentation repository.
- Submit InfluxDB issues to the InfluxDB repository.