Elementary.ScaleByPowerOfTwo Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

ScaleByPowerOfTwo(Double, Int32) Multiplies a number by a power of two.
ScaleByPowerOfTwo(Single, Int32) Multiplies a number by a power of two.

ScaleByPowerOfTwo(Double, Int32)

Multiplies a number by a power of two.
C#
public static double ScaleByPowerOfTwo(
	double value,
	int exponent
)

Parameters

value  Double
The number to multiply.
exponent  Int32
The exponent of the power of two.

Return Value

Double
The number value multiplied by a factor of 2 to the power exponent.

ScaleByPowerOfTwo(Single, Int32)

Multiplies a number by a power of two.
C#
public static float ScaleByPowerOfTwo(
	float value,
	int exponent
)

Parameters

value  Single
The number to multiply.
exponent  Int32
The exponent of the power of two.

Return Value

Single
The number value multiplied by a factor of 2 to the power exponent.

See Also