pow
This function computes n-th power of x.
function int pow (int x, int n)
{
int y = 1;
while (n-- > 0) y *= x;
return y;
}
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.