[orx-shape] Add last point for open contours (#228)
This commit is contained in:
@@ -11,8 +11,11 @@ import kotlin.math.sin
|
|||||||
import kotlin.math.sqrt
|
import kotlin.math.sqrt
|
||||||
|
|
||||||
|
|
||||||
fun ShapeContour.hobbyCurve() : ShapeContour {
|
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)
|
return hobbyCurve(vertices, closed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user