1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-25 05:57:18 +01:00
nushell/crates/nu-command/tests/commands/math
juanPabloMiceli 7fb48b9a2f
Fix negative precision round with ints (issue ) ()
# Description
Before this PR, `math round` ignores the input if it's an `int`. This
results in the following behaviour:
```
> 123 | math round --precision -1
123
```
When the correct result is 120.

Now `int values` are converted to `float values` before actually
rounding up the number in order to take advantage of the float
implementation.

Fixes .
2023-05-03 23:07:32 +02:00
..
avg.rs Allow expanding aliases before keywords, improve hiding () 2022-03-18 11:35:50 +13:00
median.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
mod.rs support multiplication operation on string and list values () 2023-02-13 16:35:53 +00:00
round.rs Fix negative precision round with ints (issue ) () 2023-05-03 23:07:32 +02:00
sqrt.rs Fix more command tests () 2022-02-15 10:08:07 -05:00
sum.rs Use variable names directly in the format strings () 2023-01-29 19:37:54 -06:00