diff options
author | Simon Krauter <trustable-code@users.noreply.github.com> | 2017-05-13 21:50:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-05-13 21:50:44 +0200 |
commit | 40e9e751f0e77211442707820b4737a253334a4f (patch) | |
tree | b4ed55dd0b97f2d282725426b65033d64f7a1749 /lib | |
parent | 534d8a6b59bce5eadd543929d01ccb2f40747fcb (diff) | |
download | Nim-40e9e751f0e77211442707820b4737a253334a4f.tar.gz |
Extend documenation of formatFloat() (#5799)
Added line: "If ``precision == 0``, it tries to format it nicely." (copied from formatBiggestFloat())
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/strutils.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 9383675f4..458c22f3a 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -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.} = |