-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomplex64.go
More file actions
31 lines (26 loc) · 785 Bytes
/
complex64.go
File metadata and controls
31 lines (26 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package pointerhelpers
// Complex64Helper contains all Complex64 related
// pointer helpers
type Complex64Helper struct {
}
// Complex64 returns a pointer to the complex64 value passed in.
func Complex64(v complex64) *complex64 {
return &v
}
// Complex64 returns a pointer to the complex64 value passed in.
func (i *Complex64Helper) Complex64(v complex64) *complex64 {
return Complex64(v)
}
// Complex64Value returns the value of the complex64 pointer passed in or
// 0 if the pointer is nil.
func Complex64Value(v *complex64) complex64 {
if v != nil {
return *v
}
return 0
}
// Complex64Value returns the value of the complex64 pointer passed in or
// 0 if the pointer is nil.
func (i *Complex64Helper) Complex64Value(v *complex64) complex64 {
return Complex64Value(v)
}