Modification to implementation of round() such that it returns a float and accepts a places argument (fixes #3473).
This also involved moving some functions around to get the hierarchy correct and the documentation for frexp was modified such that it was clear that it can return a float in either the range [-1, -0.5] or [0.5, 1].
This commit is contained in:
parent
f3fdad0eda
commit
0cc7c9a13c
4 changed files with 74 additions and 27 deletions
|
|
@ -10,7 +10,7 @@ template test(loopCount: int, extraI: int, testBody: stmt): stmt =
|
|||
|
||||
template test(loopCount: int, extraF: float, testBody: stmt): stmt =
|
||||
block:
|
||||
test(loopCount, round(extraF), testBody)
|
||||
test(loopCount, round(extraF).int, testBody)
|
||||
|
||||
template test(loopCount: int, testBody: stmt): stmt =
|
||||
block:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue