mirror of
https://github.com/DanilaFe/abacus
synced 2025-01-08 15:29:25 -08:00
Add rounding to naive number.
This commit is contained in:
parent
a881640bf6
commit
b20ddc2013
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user