Fixed nan length for rounded_polygon with zero radius corners.

This commit is contained in:
Chris Palmer 2020-11-30 21:52:42 +00:00
parent 17b12c7f31
commit f18044915d
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ function rounded_polygon_length(points, tangents) = //! Calculate the length giv
v1 = p1 - c,
v2 = p2 - c,
r = abs(corner.z),
a = acos((v1 * v2) / sqr(r))) PI * (cross(v1,v2) <= 0 ? a : 360 - a) * r / 180]
a = acos((v1 * v2) / sqr(r))) r ? PI * (cross(v1, v2) <= 0 ? a : 360 - a) * r / 180 : 0]
)
sumv(concat(straights, arcs));