Переглянути джерело

对风偏差分析风速小数位调整

王波 3 місяців тому
батько
коміт
7bf42f8e3c

+ 2 - 1
runeconomy-xk/src/main/java/com/gyee/runeconomy/service/WindDirection/WindALG.java

@@ -5,6 +5,7 @@ package com.gyee.runeconomy.service.WindDirection;
 import com.gyee.runeconomy.dto.result.PowerPointData;
 import com.gyee.runeconomy.model.auto.ProBasicEquipment;
 import com.gyee.runeconomy.util.DateUtils;
+import com.gyee.runeconomy.util.StringUtils;
 
 import java.text.DecimalFormat;
 import java.util.*;
@@ -311,7 +312,7 @@ public class WindALG {
             if (index >= -50 && index <= 50 && item.getSpeed() > 0) {
                 double key = Math.abs(index) + item.getSpeed();
                 if (!keys.contains(key))
-                    ls.add(new Point(index, item.getSpeed()));
+                    ls.add(new Point(index, StringUtils.round(item.getSpeed(),2)));
                 keys.add(key);
             }
         }