MCPcopy Create free account
hub / github.com/IoLanguage/io / UArray_bitAt_

Function UArray_bitAt_

libs/basekit/source/UArray_math.c:233–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231// adjust for endianess?
232
233int UArray_bitAt_(UArray *self, size_t i) {
234 size_t bytePos = i / 8;
235 size_t bitPos = i % 8;
236 if (bytePos >= UArray_sizeInBytes(self))
237 return 0;
238 return (self->data[bytePos] >> bitPos) & 0x1;
239}
240
241uint8_t UArray_byteAt_(UArray *self, size_t i) {
242 if (i < UArray_sizeInBytes(self))

Callers

nothing calls this directly

Calls 1

UArray_sizeInBytesFunction · 0.85

Tested by

no test coverage detected