emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js
brancharithmetic
changeset 680 7ffb635a5c4f
parent 678 8a25056ef283
child 698 ff57af563cb8
     1.1 --- a/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Tue Feb 05 17:12:17 2013 +0100
     1.2 +++ b/emul/mini/src/main/resources/org/apidesign/vm4brwsr/emul/lang/java_lang_Number.js	Wed Feb 06 12:46:35 2013 +0100
     1.3 @@ -188,10 +188,10 @@
     1.4  };
     1.5  
     1.6  Number.prototype.compare64 = function(x) {
     1.7 -    if (this.hi == x.hi) {
     1.8 -        return (this == x) ? 0 : ((this < x) ? -1 : 1);
     1.9 +    if (this.high32() === x.high32()) {
    1.10 +        return (this < x) ? -1 : ((this > x) ? 1 : 0);
    1.11      }
    1.12 -    return (this.hi < x.hi) ? -1 : 1;
    1.13 +    return (this.high32() < x.high32()) ? -1 : 1;
    1.14  };
    1.15  
    1.16  Number.prototype.neg64 = function() {