File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
src/commonMain/kotlin/com/ionspin/kotlin/bignum/decimal Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1010gradle.properties
1111/buildSrc /out
1212/bignum /node_modules
13+ /bignum /package.json
Original file line number Diff line number Diff line change 11{
22 "name" : " kotlin-multiplatform-bignum-js" ,
3- "version" : " 0.0.1" ,
4- "description" : " Kotlin Multiplatform BigNum" ,
5- "main" : " flow.js" ,
3+ "version" : " 0.0.1" ,
4+ "description" : " Kotlin Multiplatform BigNum" ,
5+ "main" : " flow.js" ,
66 "author" : " Ugljesa Jovanovic" ,
77 "license" : " Apache 2.0" ,
88 "homepage" : " " ,
99 "dependencies" : {
10- "kotlin" : " 1.3.20"
10+ "kotlin" : " 1.3.20"
1111 },
1212 "devDependencies" : {
1313 "mocha" : " 5.2.0"
1414 }
15- }
15+ }
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ class BigDecimal private constructor(
5959 val ONE = BigDecimal (BigInteger .ONE )
6060 val TWO = BigDecimal (BigInteger .TWO )
6161
62+ var useToStringExpanded : Boolean = false
63+
6264
6365 private fun roundOrDont (significand : BigInteger , exponent : BigInteger , decimalMode : DecimalMode ): BigDecimal {
6466 return if (decimalMode.decimalPrecision != 0L && decimalMode.roundingMode != RoundingMode .NONE ) {
@@ -1357,6 +1359,9 @@ class BigDecimal private constructor(
13571359 * i.e. 1.23E+9
13581360 */
13591361 override fun toString (): String {
1362+ if (BigDecimal .useToStringExpanded) {
1363+ return toStringExpanded()
1364+ }
13601365 val significandString = significand.toString(10 )
13611366 val modifier = if (significand < 0 ) {
13621367 2
You can’t perform that action at this time.
0 commit comments