remove deprecation from math.round (#15224)
This commit is contained in:
parent
7cee63bba3
commit
5163fe7d87
2 changed files with 8 additions and 2 deletions
|
|
@ -164,7 +164,14 @@
|
||||||
echo foo
|
echo foo
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Proc `math.round` is no longer deprecated. The advice to use `strformat` instead
|
||||||
|
cannot be applied to every use case. The limitations and the (lack of) reliability
|
||||||
|
of `round` are well documented.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Language changes
|
## Language changes
|
||||||
|
|
||||||
- The `=destroy` hook no longer has to reset its target, as the compiler now automatically inserts
|
- The `=destroy` hook no longer has to reset its target, as the compiler now automatically inserts
|
||||||
`wasMoved` calls where needed.
|
`wasMoved` calls where needed.
|
||||||
- In the newruntime it is now allowed to assign to the discriminator field
|
- In the newruntime it is now allowed to assign to the discriminator field
|
||||||
|
|
|
||||||
|
|
@ -768,8 +768,7 @@ else: # JS
|
||||||
## ( 6.5 mod -2.5) == 1.5
|
## ( 6.5 mod -2.5) == 1.5
|
||||||
## (-6.5 mod -2.5) == -1.5
|
## (-6.5 mod -2.5) == -1.5
|
||||||
|
|
||||||
proc round*[T: float32|float64](x: T, places: int): T {.
|
proc round*[T: float32|float64](x: T, places: int): T =
|
||||||
deprecated: "use strformat module instead".} =
|
|
||||||
## Decimal rounding on a binary floating point number.
|
## Decimal rounding on a binary floating point number.
|
||||||
##
|
##
|
||||||
## This function is NOT reliable. Floating point numbers cannot hold
|
## This function is NOT reliable. Floating point numbers cannot hold
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue