You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
438 B
37 lines
438 B
package mightypork.utils.math.num;
|
|
|
|
|
|
abstract class AbstractNum implements Num {
|
|
|
|
private NumView proxy;
|
|
|
|
|
|
@Override
|
|
public Num getNum()
|
|
{
|
|
return this;
|
|
}
|
|
|
|
|
|
@Override
|
|
public NumView view()
|
|
{
|
|
if (proxy == null) proxy = new NumProxy(this);
|
|
|
|
return proxy;
|
|
}
|
|
|
|
|
|
@Override
|
|
public NumVal copy()
|
|
{
|
|
return new NumVal(this);
|
|
}
|
|
|
|
@Override
|
|
public String toString()
|
|
{
|
|
return String.format("#{%.1f}",value());
|
|
}
|
|
|
|
}
|
|
|