Golang builtin.imag() function example
package builtin
The imag built-in function returns the imaginary part of the input complex number
Golang builtin.imag() function usage example
package main
import "fmt"
func main() {
fmt.Println(imag(100 + 8i))
}
Output :
8
Reference :
Advertisement
Something interesting
Tutorials
+39.6k Golang : Remove dashes(or any character) from string
+9.9k Golang : Sort and reverse sort a slice of integers
+17.2k Golang : When to use init() function?
+32.5k Golang : Copy directory - including sub-directories and files
+12.3k Golang : How to check if a string starts or ends with certain characters or words?
+7.1k Golang : Transform lisp or spinal case to Pascal case example
+6.2k Golang & Javascript : How to save cropped image to file on server
+24.5k Golang : How to validate URL the right way
+11.7k Golang : Secure file deletion with wipe example
+19.9k Golang : Count JSON objects and convert to slice/array
+12.6k Golang : Exit, terminating or aborting a program
+20.8k Golang : Underscore or snake_case to camel case example