Skip to content

Commit

Permalink
Remap coins.json for CryptocurrencyTool
Browse files Browse the repository at this point in the history
Add ScientificNotationParser tool
  • Loading branch information
N7ghtm4r3 committed Jul 12, 2022
1 parent d0fb6a9 commit aab79ee
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# APIManager
**v1.0.5**
**v1.0.6**

This is a Java Based library useful to work with all json api services.

Expand All @@ -23,7 +23,7 @@ allprojects {

```gradle
dependencies {
implementation 'com.github.N7ghtm4r3:APIManager:1.0.5'
implementation 'com.github.N7ghtm4r3:APIManager:1.0.6'
}
```

Expand All @@ -45,7 +45,7 @@ dependencies {
<dependency>
<groupId>com.github.N7ghtm4r3</groupId>
<artifactId>APIManager</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public static String sNotationParse(Number value){
String number = valueOf(value);
if(number.contains("E")) {
int zeroCounter = parseInt(number.split("-")[1]);
return "0." + "0".repeat(zeroCounter - 1) + "" + valueOf((double)value * Math.pow(10, zeroCounter))
StringBuilder zeroBuffer = new StringBuilder();
for (int j=0; j < zeroCounter - 1; j++)
zeroBuffer.append("0");
return "0." + zeroBuffer + valueOf((double)value * Math.pow(10, zeroCounter))
.replace(".", "");
}else {
int integers = number.split("\\.")[0].length();
Expand Down

0 comments on commit aab79ee

Please sign in to comment.