mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
Extend documenation of formatFloat() (#5799)
Added line: "If ``precision == 0``, it tries to format it nicely." (copied from formatBiggestFloat())
This commit is contained in:
committed by
Andreas Rumpf
parent
534d8a6b59
commit
40e9e751f0
@@ -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.} =
|
||||
|
||||
Reference in New Issue
Block a user