Ordered segments in trajectory

This commit is contained in:
Alexander Nozik 2022-12-10 12:30:15 +03:00
parent 29977650f1
commit 6d47c0ccec
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -102,7 +102,7 @@ public data class CircleTrajectory2D(
}
}
public open class CompositeTrajectory2D(public val segments: Collection<Trajectory2D>) : Trajectory2D {
public open class CompositeTrajectory2D(public val segments: List<Trajectory2D>) : Trajectory2D {
override val length: Double get() = segments.sumOf { it.length }
}