Category talk:Wren-rat: Difference between revisions
→Source code: Fixed bug in Rat.pow method.
m (→Source code: Corrected program comment.) |
(→Source code: Fixed bug in Rat.pow method.) |
||
Line 181:
if (!((i is Num) && i.isInteger)) Fiber.abort("Argument must be an integer.")
if (i == 0) return this.copy()
var np = _n.pow(i.abs).round
var dp = _d.pow(i.abs).round
return (i > 0) ? Rat.new(np, dp) : Rat.new(dp, np)
}
|