I\'m not that great with maths and C# doesn\'t seem to provide a power-of function so I was wondering if anyone knows how I would run a calculation like this:
For powers of 2:
var twoToThePowerOf = 1 << yourExponent; // eg: 1 << 12 == 4096
The function you want is Math.Pow in System.Math.
Math.Pow
System.Math