Skip to content

Commit 20cb0ab

Browse files
committed
Fix case with decimal n2 and .0 just before n1’s recurring decimals
1 parent 9b92a91 commit 20cb0ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AdvDiv.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ String? advdiv(String n1, String n2, [final String minstr = "-", final String de
8787
n1 = times10(n1);
8888
};
8989
n2 = times10(n2);
90-
if(n1.endsWith(".0"))
90+
if(n1.endsWith(".0") && r1=="0")
9191
n1 = n1.replaceFirst(".0", "");
9292
if(n2.endsWith(".0"))
9393
n2 = n2.replaceFirst(".0", "");

0 commit comments

Comments
 (0)