mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
JS: revert $rt_compare implementation since new one does not work properly
This commit is contained in:
parent
4e0381950a
commit
89ea97d00f
|
@ -24,11 +24,7 @@ function $rt_nextId() {
|
|||
return x;
|
||||
}
|
||||
function $rt_compare(a, b) {
|
||||
var nanA = a != a;
|
||||
var nanB = b != b;
|
||||
if (nanA | nanB) return nanA - nanB;
|
||||
if (a === 0 && b === 0) { a = 1 / a, b = 1 / b; }
|
||||
return (a > b) - (a < b);
|
||||
return a > b ? 1 : a < b ? -1 : a === b ? 0 : 1;
|
||||
}
|
||||
function $rt_isInstance(obj, cls) {
|
||||
return obj !== null && !!obj.constructor.$meta && $rt_isAssignable(obj.constructor, cls);
|
||||
|
|
Loading…
Reference in New Issue
Block a user