2021-09-24 00:36:29 -05:00
|
|
|
jdk.imports['java.lang.Double'].load = async () => {
|
2021-09-23 01:41:44 -05:00
|
|
|
class Double {
|
|
|
|
constructor() {
|
2021-09-23 23:26:42 -05:00
|
|
|
throw 'new Double() not supported';
|
2021-09-23 01:41:44 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Double.parseDouble = (d) => {
|
|
|
|
return parseFloat(d);
|
2021-09-23 23:26:42 -05:00
|
|
|
};
|
2021-09-23 01:41:44 -05:00
|
|
|
Double.compare = (a, b) => {
|
|
|
|
return a - b;
|
2021-09-23 23:26:42 -05:00
|
|
|
};
|
2021-09-23 01:41:44 -05:00
|
|
|
Double.MAX_VALUE = Number.MAX_VALUE;
|
|
|
|
Double.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
|
|
Double.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
|
|
|
|
Double.NaN = NaN;
|
2021-09-23 23:26:42 -05:00
|
|
|
jdk.java.lang.Double = Double;
|
|
|
|
};
|