Returns a complex number that is the specified
root of unity of the specified degree.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Complex<T> RootOfUnity(
int degree,
int index
)
Public Shared Function RootOfUnity (
degree As Integer,
index As Integer
) As Complex(Of T)
public:
static Complex<T> RootOfUnity(
int degree,
int index
)
static member RootOfUnity :
degree : int *
index : int -> Complex<'T>
Parameters
- degree
- Type: SystemInt32
The degree of the root. - index
- Type: SystemInt32
The index of the root.
Return Value
Type:
ComplexTA
complex number that is the
indexth root of unity of degree
degree.
The roots of unity are the solutions to the
equation zn= R.One, with n the
degree, which cannot be zero. There are exactly n solutions to this
equations. Together, they give
the coordinates of a regular n-sided polygon
with its center at the origin, its vertices at unit
distance from the origin, and its first vertex
on the real axis.
This method returns the roots of the specified
degree in counter-clockwise order. The index can be any integer value.
This method requires that the operand type supports real arithmetic.
Reference