Function writeTwosComplement [src]
Write the value of x into buffer
Asserts that buffer is large enough to store the value.
buffer is filled so that its contents match what would be observed via
@ptrCast(*[buffer.len]const u8, &x). Byte ordering is determined by endian,
and any required padding bits are added on the MSB end.
Prototype
pub fn writeTwosComplement(x: Const, buffer: []u8, endian: Endian) void
Parameters
x: Const
buffer: []u8
endian: Endian
Source
pub fn writeTwosComplement(x: Const, buffer: []u8, endian: Endian) void {
return writePackedTwosComplement(x, buffer, 0, 8 * buffer.len, endian);
}