mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-27 09:05:19 +00:00
Add precision getter to NaiveNumber.
This commit is contained in:
@@ -8,6 +8,11 @@ public class NaiveNumber implements Number {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int precision() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Number multiply(Number multiplier) {
|
||||
if(!(multiplier instanceof NaiveNumber)) throw new IllegalArgumentException();
|
||||
|
||||
Reference in New Issue
Block a user