MathF.ILogB(Single) 方法

定义

返回指定数字以 2 为底的整数对数。Returns the base 2 integer logarithm of a specified number.

public:
 static int ILogB(float x);
public static int ILogB (float x);
static member ILogB : single -> int
Public Shared Function ILogB (x As Single) As Integer

参数

x
Single

要查找其对数的数字。The number whose logarithm is to be found.

返回

下表中的值之一。One of the values in the following table.

x 参数x parameter 返回值Return value
默认Default x 以 2 为底的整数对数,即 (int)log2(x)。The base 2 integer log of x; that is, (int)log2(x).
Zero MinValue
等于 NaNPositiveInfinityNegativeInfinityEqual to NaN or PositiveInfinity or NegativeInfinityMaxValue

注解

参数x被指定为以10为基数的数字。Parameter x is specified as a base 10 number.

适用于