Closed s-hadinger closed 3 months ago
Berry add math.round() internally using the same semantic as C round() and roundf() functions:
math.round()
C
round()
roundf()
math.round(3.5)
4
math.round(-3.5)
-4
math.floor(x + 0.5)
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass
Description:
Berry add
math.round()
internally using the same semantic asC
round()
androundf()
functions:math.round(3.5)
returns4
math.round(-3.5)
returns-4
(which is different frommath.floor(x + 0.5)
)Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass