BitOperations.Log2 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Log2(UIntPtr) |
返回指定值 (base 2) 的整数 (floor) 日志。 |
| Log2(UInt32) |
返回指定值 (base 2) 的整数 (floor) 日志。 |
| Log2(UInt64) |
返回指定值 (base 2) 的整数 (floor) 日志。 |
Log2(UIntPtr)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
返回指定值 (base 2) 的整数 (floor) 日志。
public:
static int Log2(UIntPtr value);
[System.CLSCompliant(false)]
public static int Log2(UIntPtr value);
[<System.CLSCompliant(false)>]
static member Log2 : unativeint -> int
Public Shared Function Log2 (value As UIntPtr) As Integer
参数
- value
-
UIntPtr
unativeint
该值。
返回
对数值。
- 特性
注解
按照约定,输入值 0 返回 0,因为 log(0) 未定义。
适用于
Log2(UInt32)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
返回指定值 (base 2) 的整数 (floor) 日志。
public:
static int Log2(System::UInt32 value);
[System.CLSCompliant(false)]
public static int Log2(uint value);
[<System.CLSCompliant(false)>]
static member Log2 : uint32 -> int
Public Shared Function Log2 (value As UInteger) As Integer
参数
- value
- UInt32
要从中获取对数的数字。
返回
指定值的日志(base 2)。
- 特性
注解
请注意,按照约定,输入值 0 返回 0,因为 Log(0) 未定义。
适用于
Log2(UInt64)
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
重要
此 API 不符合 CLS。
返回指定值 (base 2) 的整数 (floor) 日志。
public:
static int Log2(System::UInt64 value);
[System.CLSCompliant(false)]
public static int Log2(ulong value);
[<System.CLSCompliant(false)>]
static member Log2 : uint64 -> int
Public Shared Function Log2 (value As ULong) As Integer
参数
- value
- UInt64
要从中获取对数的数字。
返回
指定值的日志(base 2)。
- 特性
注解
请注意,按照约定,输入值 0 返回 0,因为 Log(0) 未定义。