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

Function UArray_reverseItemByteOrders

libs/basekit/source/UArray_math.c:642–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640}
641
642void UArray_reverseItemByteOrders(UArray *self) {
643 size_t itemSize = self->itemSize;
644
645 if (itemSize > 1) {
646 size_t i, max = self->size;
647 uint8_t *d = self->data;
648
649 for (i = 0; i < max; i++) {
650 size_t j;
651
652 for (j = 0; j < itemSize; j++) {
653 size_t i1 = i + j;
654 size_t i2 = i + itemSize - j;
655 uint8_t v = d[i1];
656 d[i1] = d[i2];
657 d[i2] = v;
658 }
659 }
660
661 UArray_changed(self);
662 }
663}
664
665//
666void UArray_addEqualsOffsetXScaleYScale(UArray *self, UArray *other,

Callers

nothing calls this directly

Calls 1

UArray_changedFunction · 0.85

Tested by

no test coverage detected