Fraction:
Fixed exception from missing float flag.
This commit is contained in:
parent
bce5d75ba8
commit
526717242a
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user