replace "& ~(CELL - 1)" with "% CELL"

This commit is contained in:
Koichi Nakamura 2021-12-06 22:43:43 +09:00
parent c8e87b1dbf
commit 96ceb57bd4

View file

@ -33,7 +33,7 @@ ip = 0
np = 0
def aligned(n):
return (n + CELL - 1) & ~(CELL - 1)
return (n + CELL - 1) % CELL
def align():
write(HERE_CELL, aligned(read(HERE_CELL)))