MathF.Log2(Single) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回指定数字的基数 2 对数。
public:
static float Log2(float x);
public static float Log2(float x);
static member Log2 : single -> single
Public Shared Function Log2 (x As Single) As Single
参数
- x
- Single
要找到其对数的数字。
返回
下表中的值之一。
x 参数 | 返回值 |
|---|---|
| 阳性 | 的 base 2 日志 x,即 log 2x。
|
| 零 | NegativeInfinity |
| 阴性 | NaN |
| 等于 NaN | NaN |
| 等于 PositiveInfinity | PositiveInfinity |
注解
参数 x 指定为基数 10。
此方法调用基础 C 运行时,确切的结果或有效输入范围在不同操作系统或体系结构之间可能有所不同。