Skip to content

Commit

Permalink
Fix case with decimal n2 and .0 just before n1’s recurring decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
ratajs committed Aug 16, 2023
1 parent 9b92a91 commit 20cb0ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AdvDiv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ String? advdiv(String n1, String n2, [final String minstr = "-", final String de
n1 = times10(n1);
};
n2 = times10(n2);
if(n1.endsWith(".0"))
if(n1.endsWith(".0") && r1=="0")
n1 = n1.replaceFirst(".0", "");
if(n2.endsWith(".0"))
n2 = n2.replaceFirst(".0", "");
Expand Down

0 comments on commit 20cb0ab

Please sign in to comment.