TIR: fix number format

This commit is contained in:
Milos Kozak 2022-03-28 10:37:54 +02:00
parent bc9ca2cf2d
commit ee5fb86435

View file

@ -23,7 +23,7 @@ class TIR(val date: Long, val lowThreshold: Double, val highThreshold: Double) {
fun above() = run { above++; count++ } fun above() = run { above++; count++ }
private fun belowPct() = if (count > 0) below.toDouble() / count * 100.0 else 0.0 private fun belowPct() = if (count > 0) below.toDouble() / count * 100.0 else 0.0
private fun inRangePct() = if (count > 0) 100 - belowPct() - abovePct() else 0 private fun inRangePct() = if (count > 0) 100 - belowPct() - abovePct() else 0.0
private fun abovePct() = if (count > 0) above.toDouble() / count * 100.0 else 0.0 private fun abovePct() = if (count > 0) above.toDouble() / count * 100.0 else 0.0
companion object { companion object {