riku
2021-11-10 665a2e1098fb52800ac7624d4a32dfeb6ce15151
src/main/kotlin/com/flightfeather/uav/dataprocess/AvgPair.kt
@@ -1,11 +1,13 @@
package com.flightfeather.uav.dataprocess
import kotlin.math.round
data class AvgPair(
    var t: Float, var c: Int
){
    fun avg(): Float = if (c == 0) {
        0f
    } else {
        t / c
        round(t / c * 1000) / 1000
    }
}