Standard library / math/cmplx

cmplx.Phase()

Principal argument in radians, using signs of both components. Expected stdout: '0\n'.

Formal Syntax & Structure

go syntaxgo
func Phase(x complex128) float64

Parameters & Attributes

NameTypeDescription
xcomplex128First input operand (or sole input if unary).

Return Value

float64

Principal argument in radians, using signs of both components.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/cmplx")
func main() {  fmt.Println(cmplx.Phase(1))}
Go Reference