File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
core/kt-osrd-path/src/main/kotlin/fr/sncf/osrd/path/interfaces Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ data class GenericLinearRange<ValueType, OffsetType>(
4848
4949 /* * Converts a train path offset into an object offset. */
5050 fun offsetFromTrainPath (pathOffset : Offset <TrainPath >): Offset <OffsetType > {
51- val objectStart = Offset < TrainPath >(pathBegin.distance - objectBegin.distance )
51+ val objectStart = getObjectAbsolutePathStart( )
5252 return Offset (pathOffset.distance - objectStart.distance)
5353 }
5454
5555 /* * Converts an object offset into a train path offset. */
5656 fun offsetToTrainPath (objectOffset : Offset <OffsetType >): Offset <TrainPath > {
57- val objectStart = Offset < TrainPath >(pathBegin.distance - objectBegin.distance )
57+ val objectStart = getObjectAbsolutePathStart( )
5858 return objectStart + objectOffset.distance
5959 }
6060
@@ -71,8 +71,6 @@ data class GenericLinearRange<ValueType, OffsetType>(
7171 if (newPathBegin > newPathEnd) return null
7272 val removedAtStart = newPathBegin - pathBegin
7373 val removedAtEnd = pathEnd - newPathEnd
74- assert (removedAtStart >= 0 .meters)
75- assert (removedAtEnd >= 0 .meters)
7674 return GenericLinearRange (
7775 value,
7876 objectBegin + removedAtStart,
You can’t perform that action at this time.
0 commit comments