Extend documenation of formatFloat() (#5799)
Added line: "If ``precision == 0``, it tries to format it nicely." (copied from formatBiggestFloat())
This commit is contained in:
parent
534d8a6b59
commit
40e9e751f0
1 changed files with 2 additions and 0 deletions
|
|
@ -1881,6 +1881,8 @@ proc formatFloat*(f: float, format: FloatFormatMode = ffDefault,
|
|||
## of significant digits to be printed.
|
||||
## `precision`'s default value is the maximum number of meaningful digits
|
||||
## after the decimal point for Nim's ``float`` type.
|
||||
##
|
||||
## If ``precision == 0``, it tries to format it nicely.
|
||||
result = formatBiggestFloat(f, format, precision, decimalSep)
|
||||
|
||||
proc trimZeros*(x: var string) {.noSideEffect.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue