DecimalMath.ScaleByPowerOfTwo Method

Multiplies a Decimal value by a power of two.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public static decimal ScaleByPowerOfTwo(
	decimal value,
	int exponent
)

Parameters

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

Return Value

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

See Also