修改:加载备用车时的重叠检测

This commit is contained in:
joylink_zhangsai 2021-06-11 17:47:29 +08:00
parent 7d2738a889
commit c64bedaba5

View File

@ -90,6 +90,12 @@ public class SectionPosition {
public boolean isBetween(SectionPosition one, SectionPosition two) {
if (one.equals(this) || two.equals(this))
return true;
return one.isAheadOf(this, true) == this.isAheadOf(two, true);
if (one.isAheadOf(this, true)) {
return this.isAheadOf(two, true);
} else if (this.isAheadOf(one, true)) {
return two.isAheadOf(this, true);
} else {
return false;
}
}
}