diff --git a/orx-shapes/src/commonMain/kotlin/hobbycurve/HobbyCurve.kt b/orx-shapes/src/commonMain/kotlin/hobbycurve/HobbyCurve.kt index 0fd3a378..3a29a628 100644 --- a/orx-shapes/src/commonMain/kotlin/hobbycurve/HobbyCurve.kt +++ b/orx-shapes/src/commonMain/kotlin/hobbycurve/HobbyCurve.kt @@ -109,8 +109,8 @@ fun hobbyCurve(points: List, closed: Boolean = false, curl: Double = 0. } } - val c1s = mutableListOf() - val c2s = mutableListOf() + val c1s = ArrayList(n) + val c2s = ArrayList(n) for (i in 0 until n) { val v1 = rotateAngle(chords[i], alpha[i]).normalized val v2 = rotateAngle(chords[i], -beta[i]).normalized @@ -205,8 +205,8 @@ fun hobbyCurve( } } - val c1s = mutableListOf() - val c2s = mutableListOf() + val c1s = ArrayList(n) + val c2s = ArrayList(n) for (i in 0 until n) { val r1 = buildTransform { rotate(normals[i], alpha[i].asDegrees) } val r2 = buildTransform { rotate(normals[(i + 1).mod(normals.size)], -beta[i].asDegrees) }