TIR: fix number format
This commit is contained in:
parent
bc9ca2cf2d
commit
ee5fb86435
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue