isAligned static method
Verify if an offset is properly aligned
offset
: The current offsetalignment
: The alignment boundary Returns true if the offset is properly aligned, false otherwise
Implementation
static bool isAligned(int offset, int alignment) {
return offset % alignment == 0;
}