[修改]区段、Link、运营方向/位置之间互相转换的函数的bug

This commit is contained in:
thesai 2024-05-17 14:39:26 +08:00
parent b3270c5921
commit 37799cd2c9

View File

@ -22,7 +22,7 @@ func LinkRadialToDeviceRadial(repo *repository.Repository, linkPosition *reposit
}
if linkRange.Start() <= offset && offset <= linkRange.End() {
sectionOffset := number.Abs(offset - section.ALinkPosition().Offset())
toB := toBig && section.BLinkPosition().Offset() > section.ALinkPosition().Offset()
toB := toBig == (section.BLinkPosition().Offset() > section.ALinkPosition().Offset())
aKm := convertRepoBaseKm(repo, section.AKilometer())
bKm := convertRepoBaseKm(repo, section.BKilometer())
runDirection := toB == (bKm.Value > aKm.Value)