Skip to content

Commit 0c1bcec

Browse files
committed
Symmetrify positive/negative glue construction
1 parent 4f1d733 commit 0c1bcec

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/ThreeTiles.civet

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ function wheel(t: Turtle, tiles: Prototile[], nBits: number): Turtle[]
7474
// Convert string to array of numbers
7575
bits := for each bit of bitString
7676
Number bit
77-
if g > 0
78-
bits.unshift 0, 0
79-
bits.push 0, 1
80-
else
77+
// Padding
78+
bits.unshift 0, 0
79+
bits.push 0, 1
80+
// Negative glues get reversed
81+
if g < 0
8182
bits.reverse()
82-
bits.unshift 1, 0
83-
bits.push 0, 0
8483

8584
// Colored glue polygon
8685
bisector := 90 - 45 / tiles#

0 commit comments

Comments
 (0)