[orx-shapes] Adapt to changes made to Segment.control

This commit is contained in:
Edwin Jakobs
2024-01-14 13:18:21 +01:00
parent bec51b9e31
commit 590a2b30f5
3 changed files with 16 additions and 15 deletions

View File

@@ -101,13 +101,13 @@ fun Segment.scale(polarity: YPolarity, scale: (Double) -> Double): Segment {
val nd = d.normalized * s
it + rc * nd
}
return copy(newStart, newControls.toTypedArray(), newEnd)
return copy(newStart, newControls, newEnd)
} else {
val newControls = control.mapIndexed { index, it ->
val rc = scale((index + 1.0) / 3.0)
it + rc * normal((index + 1.0), polarity)
}
return copy(newStart, newControls.toTypedArray(), newEnd)
return copy(newStart, newControls, newEnd)
}
}