From c64bedaba54caf716cd38c86690fc0d045a9f960 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Fri, 11 Jun 2021 17:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=A4=87=E7=94=A8=E8=BD=A6=E6=97=B6=E7=9A=84=E9=87=8D=E5=8F=A0?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simulation/cbtc/data/support/SectionPosition.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/support/SectionPosition.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/support/SectionPosition.java index 74ca4fbb2..37714781c 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/support/SectionPosition.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/support/SectionPosition.java @@ -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; + } } }