Bugfix for line_of()

This commit is contained in:
Garth Minette
2021-07-05 20:46:43 -07:00
parent 0b342bea6f
commit c967b507a6
3 changed files with 26 additions and 1 deletions

View File

@@ -130,7 +130,7 @@ function line_of(spacing, n, l, p1, p2) =
assert(is_undef(p2) || is_vector(p2))
let(
ll = !is_undef(l)? scalar_vec3(l, 0) :
(!is_undef(spacing) && !is_undef(n))? (n * scalar_vec3(spacing, 0)) :
(!is_undef(spacing) && !is_undef(n))? ((n-1) * scalar_vec3(spacing, 0)) :
(!is_undef(p1) && !is_undef(p2))? point3d(p2-p1) :
undef,
cnt = !is_undef(n)? n :