mirror of
https://github.com/golang/go
synced 2024-11-24 04:50:07 -07:00
updates comments
This commit is contained in:
parent
8021bb2912
commit
405d51b12e
@ -556,14 +556,14 @@ func (f *fmt) fmtFloat(v float64, size int, verb rune, prec int) {
|
||||
if num[i] != '0' {
|
||||
sawNonzeroDigit = true
|
||||
}
|
||||
// Count significant digits after saw the first non-zero digit.
|
||||
// Count significant digits after the first non-zero digit.
|
||||
if sawNonzeroDigit {
|
||||
digits--
|
||||
}
|
||||
}
|
||||
}
|
||||
if !hasDecimalPoint {
|
||||
// decimal 0 should contribute once to digits.
|
||||
// Leading digit 0 should contribute once to digits.
|
||||
if len(num) == 2 && num[1] == '0' {
|
||||
digits--
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user