Golang builtin.complex() function example
package builtin
The complex built-in function constructs a complex value from two floating-point values. The real and imaginary parts must be of the same size, either float32 or float64 (or assignable to them), and the return value will be the corresponding complex type (complex64 for float32, complex128 for float64).
Golang builtin.complex() function usage example
package main
import "fmt"
func main() {
fmt.Println(complex(100, 8))
}
Output :
(100+8i)
Reference :
Advertisement
Something interesting
Tutorials
+7.1k Golang : Get environment variable
+8.8k Android Studio : Image button and button example
+9.9k Golang : Check if user agent is a robot or crawler example
+16.9k Golang : How to generate QR codes?
+20.2k Golang : Reset or rewind io.Reader or io.Writer
+5.8k Golang : Find change in a combination of coins example
+5k Google : Block or disable caching of your website content
+20k Golang : How to run your code only once with sync.Once object
+13.6k Golang : Set image canvas or background to transparent
+37.7k Golang : Comparing date or timestamp
+6.7k Golang : Reverse by word
+62.7k Golang : Convert HTTP Response body to string