From 7aa5444a36007fc463ef8a4a08ed1bed5bc3bfd3 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期一, 13 一月 2025 13:06:27 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java b/src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java
index 93316ad..77a1873 100644
--- a/src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java
+++ b/src/main/java/com/zy/asrs/utils/SortTheExecutionOfTheCarUtil.java
@@ -458,4 +458,20 @@
 //    }
 
 
+    //鑾峰彇鏈�杩戝苟鍦ㄥ綋鍓嶄綅缃墠杈圭殑浣嶇疆 0==>1000===>1000000==>0
+    public static Double LatelyAndLessThan(long devPosition,long rgvPosition,long perimeter){
+        long Difference = perimeter;
+        if (devPosition >= rgvPosition){
+            if ((devPosition-rgvPosition) < Difference){
+                Difference = devPosition-rgvPosition;
+            }
+        } else {
+            if (perimeter - (rgvPosition - devPosition) < Difference){
+                Difference = perimeter - (rgvPosition - devPosition);
+            }
+        }
+        return Double.valueOf(Difference);
+    }
+
+
 }

--
Gitblit v1.9.1