diff --git a/src/utils.typ b/src/utils.typ index 0186861..6210eb4 100644 --- a/src/utils.typ +++ b/src/utils.typ @@ -125,7 +125,7 @@ #let is-length-vector(v) = v.all(x => type(x) == length) #let is-number-vector(v) = v.all(x => type(x) in (int, float)) -#let is-nan-vector(v) = is-number-vector(v) and v.all(x => float(x).is-nan()) +#let is-nan-vector(v) = is-number-vector(v) and v.any(x => float(x).is-nan()) #let lerp(a, b, t) = a*(1 - t) + b*t diff --git a/tests/anchors/ref/5.png b/tests/anchors/ref/5.png index e7c980a..d6e2e70 100644 Binary files a/tests/anchors/ref/5.png and b/tests/anchors/ref/5.png differ diff --git a/tests/anchors/test.typ b/tests/anchors/test.typ index a0535e0..01084de 100644 --- a/tests/anchors/test.typ +++ b/tests/anchors/test.typ @@ -69,8 +69,16 @@ Node positions depending on other nodes' anchors #diagram( node((0,0), [Alpha], name: , fill: green), + node((1,1), [Beta], name: , fill: yellow), node(, $ times.circle $), edge(, "->", auto), - node((rel: (0pt, -20pt), to: ), $ plus.circle $, inset: 0pt, name: ), - node((rel: (10pt, 0pt), to: ), $ f $), + node((rel: (0pt, -20pt), to: ), $ plus.circle $, inset: 0pt, name: ), + node((rel: (10pt, 0pt), to: ), $ f $), + edge( + , + ((), "-|", (, 50%, )), + ((), "|-", ), + , + "..>", + ) ) \ No newline at end of file