[orx-shape] Add last point for open contours (#228)

This commit is contained in:
Abe Pazos
2022-02-19 18:23:27 +01:00
committed by GitHub
parent 0fcfbe2fae
commit ccc3ed5bbc

View File

@@ -12,7 +12,10 @@ import kotlin.math.sqrt
fun ShapeContour.hobbyCurve(): ShapeContour {
val vertices = segments.map { it.start }
val vertices = if (closed)
segments.map { it.start }
else
segments.map { it.start } + segments.last().end
return hobbyCurve(vertices, closed)
}