C# has a function that calculates the log in base 2 for you, look at the following code: int number;. double logBase2 = Math.Log2(number);.
確定! 回上一頁