gecko-dev/js/js2/java/NativeNumber.java

18 lines
360 B
Java
Raw Normal View History

1999-05-26 01:01:07 +00:00
class NativeNumber extends JSObject {
NativeNumber(double p) {
super("Number");
1999-05-26 01:01:07 +00:00
d = p;
}
JSValue defaultValue(Environment theEnv, String hint) {
if (hint.equals("String"))
return new JSString(Double.toString(d));
else
return new JSDouble(d);
}
double d;
}