In Swift, we can exponentiate Doubles with the built-in pow() method:
pow(BASE, EXPONENT)
In the code below, the base (10) is set to the power of the exponent (2) :
let number = pow(10.0, 2.0) // Equals 100
Appstore & Swift blog
In Swift, we can exponentiate Doubles with the built-in pow() method:
pow(BASE, EXPONENT)
In the code below, the base (10) is set to the power of the exponent (2) :
let number = pow(10.0, 2.0) // Equals 100