Browse Source

Replace modulo with multiply operator, fixes #24

master
Devine Lu Linvega 6 years ago
parent
commit
20de73bb10
  1. 8
      sim.c

8
sim.c

@ -577,12 +577,12 @@ END_OPERATOR
BEGIN_OPERATOR(modulo) BEGIN_OPERATOR(modulo)
LOWERCASE_REQUIRES_BANG; LOWERCASE_REQUIRES_BANG;
PORT(0, -1, IN);
PORT(0, 1, IN); PORT(0, 1, IN);
PORT(0, 2, IN);
PORT(1, 0, OUT); PORT(1, 0, OUT);
Usz ia = index_of(PEEK(0, 1)); Usz ia = index_of(PEEK(0, -1));
Usz ib = index_of(PEEK(0, 2)); Usz ib = index_of(PEEK(0, 1));
POKE(1, 0, indexed_glyphs[ib == 0 ? 0 : (ia % ib)]); POKE(1, 0, indexed_glyphs[ia * ib]);
END_OPERATOR END_OPERATOR
BEGIN_OPERATOR(offset) BEGIN_OPERATOR(offset)

Loading…
Cancel
Save