1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-14 23:27:06 -07:00

Add rounding to naive number.

This commit is contained in:
Danila Fedorin 2017-07-28 09:57:39 -07:00
parent a881640bf6
commit b20ddc2013

View File

@ -92,7 +92,8 @@ public class NaiveNumber implements NumberInterface {
}
public String toString(){
return Double.toString(value);
double shiftBy = Math.pow(10, 10);
return Double.toString(Math.round(value * shiftBy) / shiftBy);
}
}