Returns a number raised to an integer power.
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function Pow ( _ x As Double, _ n As Integer _ ) As Double |
| C# |
|---|
public static double Pow ( double x, int n ) |
| C++ |
|---|
public: static double Pow ( double x, int n ) |
Parameters
- x (System.Double)
- A real number.
- n (System.Int32)
- An integer exponent.
Return Value
The real number raised to the specified exponent.
Remarks
Raising a number to an integer power is orders of
magnitude faster than raising a number to a real power.
If you know the exponent is an integer, use this method instead
of the Pow(Double, Double) method of
Math.