F writes f to w.
(f float64)
| 138 | |
| 139 | // F writes f to w. |
| 140 | func (w *QWriter) F(f float64) { |
| 141 | n := int(f) |
| 142 | if float64(n) == f { |
| 143 | // Fast path - just int. |
| 144 | w.D(n) |
| 145 | return |
| 146 | } |
| 147 | |
| 148 | // Slow path. |
| 149 | w.FPrec(f, -1) |
| 150 | } |
| 151 | |
| 152 | // FPrec writes f to w using the given floating point precision. |
| 153 | func (w *QWriter) FPrec(f float64, prec int) { |