Fix formattings issue with percentages

feature/top10
Laurent 7 years ago
parent fe6bf3eba3
commit ddf4591fce
  1. 4
      app/src/main/java/net/pokeranalytics/android/calculus/Stat.kt

@ -146,8 +146,8 @@ class ComputedStat(stat: Stat, value: Double) {
return TextFormat(value.formattedHourlyDuration())
} // red/green percentages
Stat.WIN_RATIO, Stat.ROI -> {
val color = if (value >= this.stat.threshold) R.color.green else R.color.red
return TextFormat("${value.formatted()}%", color)
val color = if (value * 100 >= this.stat.threshold) R.color.green else R.color.red
return TextFormat("${(value * 100).formatted()}%", color)
} // white amounts
Stat.AVERAGE_BUYIN, Stat.STANDARD_DEVIATION, Stat.STANDARD_DEVIATION_HOURLY,
Stat.STANDARD_DEVIATION_BB_PER_100_HANDS -> {

Loading…
Cancel
Save