File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed
src/commonMain/kotlin/com/ionspin/kotlin/bignum/decimal Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 1111gradle.properties
1212/buildSrc /out
1313/bignum /node_modules
14+ /bignum /package.json
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " kotlin-multiplatform-bignum-js" ,
3+ "version" : " 0.0.1" ,
4+ "description" : " Kotlin Multiplatform BigNum" ,
5+ "main" : " flow.js" ,
6+ "author" : " Ugljesa Jovanovic" ,
7+ "license" : " Apache 2.0" ,
8+ "homepage" : " " ,
9+ "dependencies" : {
10+ "kotlin" : " 1.3.20"
11+ },
12+ "devDependencies" : {
13+ "mocha" : " 5.2.0"
14+ }
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