complx.Phase() Function in Golang with Examples
In Go language, cmplx packages supply basic constants as well as mathematical functions for the complex numbers. The Phase() function in Go language is used to return the phase (also called the argument) of a given number. Moreover, this function is defined under the cmplx package. Here, you need to import “math/cmplx” package in order to use these functions.
func Phase(x complex128) float64
The return value is in the range [-Pi, Pi].