AppendComplex128 appends a complex128 to the slice as a MessagePack extension
(b []byte, c complex128)
| 304 | |
| 305 | // AppendComplex128 appends a complex128 to the slice as a MessagePack extension |
| 306 | func AppendComplex128(b []byte, c complex128) []byte { |
| 307 | o, n := ensure(b, Complex128Size) |
| 308 | o[n] = mfixext16 |
| 309 | o[n+1] = Complex128Extension |
| 310 | big.PutUint64(o[n+2:], math.Float64bits(real(c))) |
| 311 | big.PutUint64(o[n+10:], math.Float64bits(imag(c))) |
| 312 | return o |
| 313 | } |
| 314 | |
| 315 | // AppendTime appends a time.Time to the slice as a MessagePack extension |
| 316 | func AppendTime(b []byte, t time.Time) []byte { |
searching dependent graphs…