MathF.ILogB(Single) 方法

定義

傳回以 2 為底數時指定數字的整數對數。

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

要找出其對數的數字。

傳回

下表的其中一個值。

x 參數 傳回值
預設 以 2 為底數時 x 的整數對數,即 (int)log2(x)。
Int32.MinValue
等於 NaNPositiveInfinityNegativeInfinityInt32.MaxValue

備註

參數 x 指定為基底 10 個數字。

這個方法會呼叫基礎 C 執行時間,而且不同的作業系統或架構之間,確切的結果或有效輸入範圍可能會不同。

適用於