Skip to content

Commit

Permalink
Fixed double numbers format for values between 1 and 10. Now 4 signif…
Browse files Browse the repository at this point in the history
…icant digits, as for all other smaller values (#178)
  • Loading branch information
aneonex authored Jan 4, 2022
1 parent a1725f3 commit 225f23e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ object FormatUtilsBase {
// ====================
fun formatDouble(value: Double/*, isPrice: Boolean*/): String {
val decimalFormat: DecimalFormat = when {
value < 1 -> FORMAT_FOUR_SIGNIFICANT_AT_MOST
value < 10 -> FORMAT_FOUR_SIGNIFICANT_AT_MOST
value < 10000 -> FORMAT_TWO_DECIMAL
else -> FORMAT_NO_DECIMAL
}
Expand Down

0 comments on commit 225f23e

Please sign in to comment.