Merge pull request #230 from Aga-C/fix-percentage
Fixed large number percentage error (#228)
This commit is contained in:
commit
3352fab92e
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
|
|||
// handle cases like 10%200 here
|
||||
val result = if (sign == "%") {
|
||||
val second = secondValue / 100f
|
||||
ExpressionBuilder("${baseValue.format()}*${second.format()}").build().evaluate()
|
||||
ExpressionBuilder("${baseValue.format().replace(",", "")}*${second.format()}").build().evaluate()
|
||||
} else {
|
||||
ExpressionBuilder(expression.replace(",", "")).build().evaluate()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue