修改:加载备用车时的重叠检测
This commit is contained in:
parent
7d2738a889
commit
c64bedaba5
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user