GenericExtensions.Pow<T>(IRingOperations<T>, T, Int32) Method

Raises a value to the specified power..

Definition

Namespace: Extreme.Mathematics.Generic
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static T Pow<T>(
	this IRingOperations<T> ops,
	T value,
	int exponent
)

Parameters

ops  IRingOperations<T>
A IRingOperations<T> instance that performs basic arithmetic operations.
value  T
A value.
exponent  Int32
An integer.

Type Parameters

T

Return Value

T
The value value raised to the power exponent.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRingOperations<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

A NotSupportedException should be thrown if exponent is negative and the operand type does not support division.

See Also