AppendComplex64 appends a complex64 to the slice as a MessagePack extension
(b []byte, c complex64)
| 294 | |
| 295 | // AppendComplex64 appends a complex64 to the slice as a MessagePack extension |
| 296 | func AppendComplex64(b []byte, c complex64) []byte { |
| 297 | o, n := ensure(b, Complex64Size) |
| 298 | o[n] = mfixext8 |
| 299 | o[n+1] = Complex64Extension |
| 300 | big.PutUint32(o[n+2:], math.Float32bits(real(c))) |
| 301 | big.PutUint32(o[n+6:], math.Float32bits(imag(c))) |
| 302 | return o |
| 303 | } |
| 304 | |
| 305 | // AppendComplex128 appends a complex128 to the slice as a MessagePack extension |
| 306 | func AppendComplex128(b []byte, c complex128) []byte { |
searching dependent graphs…