Returns a vector containing the rounded values of the corresponding elements of the given vector.
d=vec_round(a)
The following table describes the types of the returned value and the function arguments.
d | a |
---|---|
vector4double | vector4double |
Each element of the result contains the value of the corresponding element of a, rounded to the nearest representable floating-point integer.
For each element of a:
If a[n] <0, d[n] = (a[n] – 0.5), truncated to the nearest integral value.
If a[n] >0, d[n] = (a[n] + 0.5), truncated to the nearest integral value.
If a[n] EQ 0, d[n] = 0.
ARG1 = (-5.8, -2.3, 2.3, 5.8)
Result: (-6.0, -2.0, 2.0, 6.0)