Documentation
¶
Index ¶
- Constants
- func MapToSlice(m map[float32]struct{}) []float32
- func Parse(v string) (float32, error)
- func Ptr(v float32) *float32
- func PtrDefToNil(v float32, def float32) *float32
- func PtrZeroToNil(v float32) *float32
- func SafeIndex(s []float32, i int) float32
- func SafeIndexPtr(s []float32, i int) *float32
- func SliceToMap(s []float32) map[float32]struct{}
- func SwapMap(m map[float32]float32) (map[float32]float32, error)
- func Val(v *float32) float32
- func ValDef(v *float32, def float32) float32
- type Slice
Constants ¶
View Source
const (
// BitSize is the size in bits of this type.
BitSize = 32
)
Variables ¶
This section is empty.
Functions ¶
func MapToSlice ¶
MapToSlice converts a map to slice.
func PtrDefToNil ¶
PtrDefToNil returns a pointer to the value, or nil if "def".
func PtrZeroToNil ¶
PtrZeroToNil returns a pointer to the value, or nil if 0.
func SafeIndexPtr ¶
SafeIndexPtr returns "s[i]" if possible, an nil otherwise.
func SliceToMap ¶
SliceToMap converts a slice to map.
Types ¶
Click to show internal directories.
Click to hide internal directories.