Is that even necessary? `Math.pow` handles those c...
# getting-started
d
Is that even necessary?
Math.pow
handles those cases
Copy code
fun Int.toThePowerOf(exponent: Int): Int = Math.pow(this.toDouble(), exponent.toDouble()).toInt()
seems to do the job