Get the nth root of a number, where n is the degree of the root. For example, get the cube root of 27 using rootOfDegree(27, 3).