WriteFloat writes out the given float and bitSize in JSON number value.
(n float64, bitSize int)
| 140 | |
| 141 | // WriteFloat writes out the given float and bitSize in JSON number value. |
| 142 | func (e *Encoder) WriteFloat(n float64, bitSize int) { |
| 143 | e.prepareNext(scalar) |
| 144 | e.out = appendFloat(e.out, n, bitSize) |
| 145 | } |
| 146 | |
| 147 | // appendFloat formats given float in bitSize, and appends to the given []byte. |
| 148 | func appendFloat(out []byte, n float64, bitSize int) []byte { |