Category talk:Wren-rat: Difference between revisions
→Source code: Doh. still not right :(
(→Source code: Fixed bug in Rat.pow method.) |
(→Source code: Doh. still not right :() |
||
Line 180:
pow(i) {
if (!((i is Num) && i.isInteger)) Fiber.abort("Argument must be an integer.")
if (i == 0) return
if (i == 1) return this.copy()
if (i == -1) return this.inverse
var np = _n.pow(i.abs).round
var dp = _d.pow(i.abs).round
|