2 Commits

View File

@@ -63,6 +63,12 @@
if to == "out" {
dy = height / 2
} else {
let all-ports = range(inputs).map(i => "in" + str(i))
let i = all-ports.position(p => p == to)
assert(
i != none,
message: "Unknown port '" + y.to + "' must be one of " + repr(all-ports)
)
dy = height * (i + 0.5) / inputs
}