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
+8.2k Android Studio : Rating bar example
+9k Golang : automatically figure out array length(size) with three dots
+5.4k Golang : Return multiple values from function
+23.5k Golang : Check if element exist in map
+8.4k Golang : Ackermann function example
+19.2k Golang : Check if directory exist and create if does not exist
+8.9k Golang : Find network service name from given port and protocol
+48.1k Golang : How to convert JSON string to map and slice
+22.2k Golang : Securing password with salt
+17.1k Golang : XML to JSON example
+36.3k Golang : Convert(cast) int64 to string
+8.7k Golang : Combine slices but preserve order example