Fraction:

Fixed exception from missing float flag.
This commit is contained in:
HeshamTB 2020-08-30 17:33:26 +03:00
parent bce5d75ba8
commit 526717242a
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -161,7 +161,7 @@ public class Fraction {
*/
public String decimal(int digits){
return String.format("%."+digits, (double)this.numerator / this.denominator);
return String.format("%."+digits+"f", (double)this.numerator / this.denominator);
}