From 20cb0abf45516dba972c7b2a909ad5da422bd09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Rataj?= Date: Wed, 16 Aug 2023 11:36:21 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20case=20with=20decimal=20n2=20and=20.0=20j?= =?UTF-8?q?ust=20before=20n1=E2=80=99s=20recurring=20decimals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/AdvDiv.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AdvDiv.dart b/lib/AdvDiv.dart index 7d16bbb..46fac64 100644 --- a/lib/AdvDiv.dart +++ b/lib/AdvDiv.dart @@ -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", "");