pow

From ZDoom Wiki

Jump to: navigation, search

This function computes n-th power of x.

function int pow (int x, int n)
{
	if (n < 1)
		return 1;
	int y = x;
	while (--n)
		y *= x;
	return y;
}
Retrieved from "http://zdoom.org/wiki/Pow"
Personal tools