From 01eae19a4870033e879a3faa6749eece92926cab Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 26 一月 2024 17:10:55 +0800
Subject: [PATCH] 1. 新增多项yml配置文件 2. 新增导入静安监测数据功能模块(未完成)

---
 src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt b/src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt
index 02daa91..aa27311 100644
--- a/src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt
+++ b/src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt
@@ -1,11 +1,21 @@
 package com.flightfeather.uav.dataprocess
 
+import kotlin.math.round
+
+/**
+ * 鍧囧�艰绠椾腑闂撮噺
+ * @param t 鎬诲拰
+ * @param c 鎬绘暟
+ */
 data class AvgPair(
     var t: Float, var c: Int
 ){
+    /**
+     * 璁$畻缁撴灉
+     */
     fun avg(): Float = if (c == 0) {
         0f
     } else {
-        t / c
+        round(t / c * 1000) / 1000
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3