aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-11-02 20:50:13 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-11-02 20:52:15 -0500
commit2af82d55798625383f9c42063043504ba9677c43 (patch)
treefdaa06510acfd0d4d7395a2ed4940e81db946c44 /src
parentd1a67e25a4f6c94dce878b03cfebf1654b65bfe4 (diff)
Improve explainer alignment
Diffstat (limited to 'src')
-rw-r--r--src/e.bqn6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/e.bqn b/src/e.bqn
index b5921974..62eed453 100644
--- a/src/e.bqn
+++ b/src/e.bqn
@@ -1,9 +1,9 @@
# Expression explainer: generates an svg diagram to show how a BQN
# program is evaluated
-wh ← 10.75‿24
+wh ← 10.84‿24
pad← wh×2‿1
-to ← 1‿¯1+wh÷2‿3
+to ← 0‿¯1+wh÷2‿3
t ← 10
ps ← At "stroke=currentColor|fill=none|stroke-width=1"
@@ -78,7 +78,7 @@ Explain ← {
je←j∾¯1.25
q←(/k≤j≠p⊏je-la) (⊏≍⊣) p
- pd ← <∘(∾"M VH"∾¨∾⟜⌽)˘˜˝ q ⊏ FmtNum¨ ⍉wh×0.6‿0.1+je≍d
+ pd ← <∘(∾"M VH"∾¨∾⟜⌽)˘˜˝ q ⊏ FmtNum¨ ⍉wh×0.5‿0.1+je≍d
tp ← ii ("text" Attr Pos)∘(to+wh×≍)¨ (k/p)⊏d
dim← (wh×⟨≠𝕩,2+⌈´d⟩)+2‿0×pad
(512‿0⊸⌈⊸(⊣∾˜(t+pad)-˜-˜÷2˙)dim+2×t) SVG gr Enc ∾⥊¨⟨