mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-09 08:55:20 +00:00
Add rounding to naive number.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user