Erik Davies wrote:is there another way to rewrite this method without using the Math.pow? cause the second argument cant be a negative integer.
remeber that a^(-b) is the same as 1/(a^b). So if you have a negative exponent, treat it like it is positive, then take the reciprocal.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors