power


描述

This will return the value of a number multiplied by itself "n" number of times. For example, power(5,3) will multiply 5 by itself 3 times and return 125, which is the same as saying 5*5*5=125. Please note that the "x" value (the number to change) cannot be a negative value.


语法:

power(x, n);


参数 描述
x 需要转换的数。
n How many times to multiply x by itself.


Returns:

实数


例如:

score += power(dmg, 3);

This will add the value of held in the variable "dmg" to the power of 3 to the score variable.