JS: revert $rt_compare implementation since new one does not work properly
@@ -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);
