Functions.NextPowerOfTwo Method

Definition

Overloads

NextPowerOfTwo(Single)

Returns the next power of two that is larger than the specified number.

NextPowerOfTwo(Int64)

Returns the next power of two that is larger than the specified number.

NextPowerOfTwo(Int32)

Returns the next power of two that is larger than the specified number.

NextPowerOfTwo(Double)

Returns the next power of two that is larger than the specified number.

NextPowerOfTwo(Single)

Returns the next power of two that is larger than the specified number.

public static float NextPowerOfTwo (float n);
static member NextPowerOfTwo : single -> single

Parameters

n
Single

The specified number.

Returns

The next power of two.

Applies to

NextPowerOfTwo(Int64)

Returns the next power of two that is larger than the specified number.

public static long NextPowerOfTwo (long n);
static member NextPowerOfTwo : int64 -> int64

Parameters

n
Int64

The specified number.

Returns

The next power of two.

Applies to

NextPowerOfTwo(Int32)

Returns the next power of two that is larger than the specified number.

public static int NextPowerOfTwo (int n);
static member NextPowerOfTwo : int -> int

Parameters

n
Int32

The specified number.

Returns

The next power of two.

Applies to

NextPowerOfTwo(Double)

Returns the next power of two that is larger than the specified number.

public static double NextPowerOfTwo (double n);
static member NextPowerOfTwo : double -> double

Parameters

n
Double

The specified number.

Returns

The next power of two.

Applies to