mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-04 21:23:12 +08:00
Clarify math documentation
The words "rounded down" here get us into some trouble.
This commit is contained in:
parent
f9786673e3
commit
39fbc27d8d
@ -36,7 +36,7 @@ The following options are available:
|
||||
**-s** *N* or **--scale** *N*
|
||||
Sets the scale of the result.
|
||||
``N`` must be an integer or the word "max" for the maximum scale.
|
||||
A scale of zero causes results to be rounded down to the nearest integer.
|
||||
A scale of zero causes results to be truncated, not rounded. Any non-integer component is thrown away.
|
||||
So ``3/2`` returns ``1`` rather than ``2`` which ``1.5`` would normally round to.
|
||||
This is for compatibility with ``bc`` which was the basis for this command prior to fish 3.0.0.
|
||||
Scale values greater than zero causes the result to be rounded using the usual rules to the specified number of decimal places.
|
||||
|
Loading…
x
Reference in New Issue
Block a user