mirror of
https://github.com/quinton-ashley/java2js
synced 2024-12-29 10:11:54 +01:00
20 lines
434 B
JavaScript
Executable File
20 lines
434 B
JavaScript
Executable File
jre.imports['java.lang.Double'].load = () => {
|
|
|
|
class Double {
|
|
constructor() {
|
|
throw "new Double() not supported";
|
|
}
|
|
}
|
|
Double.parseDouble = (d) => {
|
|
return parseFloat(d);
|
|
}
|
|
Double.compare = (a, b) => {
|
|
return a - b;
|
|
}
|
|
Double.MAX_VALUE = Number.MAX_VALUE;
|
|
Double.POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
Double.NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
|
|
Double.NaN = NaN;
|
|
jre.java.lang.Double = Double;
|
|
}
|