Function

vDSP_zvphas(_:_:_:_:_:)

Calculates the single-precision elementwise phase values, in radians, of the supplied complex vector using the specified stride.

Declaration

func vDSP_zvphas(_ __A: UnsafePointer<DSPSplitComplex>, _ __IA: vDSP_Stride, _ __C: UnsafeMutablePointer<Float>, _ __IC: vDSP_Stride, _ __N: vDSP_Length)

Parameters

__A

Single-precision complex input vector.

__IA

Stride for A.

__C

Single-precision real output vector.

__IC

Stride for C.

__N

The number of elements to process.

Discussion

Finds the phase values, in radians, of complex vector A and store the results in real vector C. The results are between -pi and +pi. The sign of the result is the sign of the second coordinate in the input vector, except that the vDSP_zvphas function does not necessarily respect the sign of a zero input.

This performs the following operation:

for (n = 0; n < N; ++n)
   C[n] = atan2(Im(A[n]), Re(A[n]));

See Also

Single-Vector Phase Computation

static func phase<V>(DSPSplitComplex, result: inout V)

Calculates the single-precision elementwise phase values, in radians, of the supplied complex vector.

static func phase<V>(DSPDoubleSplitComplex, result: inout V)

Calculates the double-precision elementwise phase values, in radians, of the supplied complex vector.

func vDSP_zvphasD(UnsafePointer<DSPDoubleSplitComplex>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Stride, vDSP_Length)

Calculates the double-precision elementwise phase values, in radians, of the supplied complex vector using the specified stride.