Closed Patashu closed 5 years ago
α 1.0.1
Not fixed, now I get this instead:
new OmegaNum(-1).cmp(new OmegaNum(-2))
OmegaNum.html:129 Uncaught TypeError: this.neg(...).cmp(...).neg is not a function
at OmegaNum.P.compareTo.P.cmp (OmegaNum.html:129)
at <anonymous>:1:18
Facepalm Of course it doesn't work, I'm neg()
ing on a Number!
Fixed!
(should be 1 since -1 > -2)
to fix this, you just have to multiply the return value by the sign if the signs are different, e.g. https://github.com/Patashu/break_eternity.js/blob/master/break_eternity.js#L1456