Documentation
¶
Index ¶
- func AsInt[V Number](v V) int
- func AsInt64[V Number](v V) int64
- func AsUint[V Number](v V) uint
- func AsUint64[V Number](v V) uint64
- func Ceil[V Number](value, max V) V
- func Clamp[V Number](value, min, max V) V
- func Floor[V Number](value, min V) V
- func ReverseSortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)
- func Round[V Decimal](x V) (rounded int)
- func RoundDown[V Decimal](value V) (rounded int)
- func RoundUp[V Decimal](value V) (rounded int)
- func SortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)
- func ToFloat64(v interface{}, d float64) float64
- func ToInt(v interface{}, d int) int
- func ToInt64(v interface{}, d int64) int64
- func ToUint(v interface{}, d uint) uint
- func ToUint64(v interface{}, d uint64) uint64
- type Complex
- type Decimal
- type Integer
- type Integers
- type Number
- type UnsignedInteger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReverseSortedNumbers ¶
func ReverseSortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)
func SortedNumbers ¶
func SortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)
Types ¶
type Complex ¶ added in v0.5.0
type Complex interface {
~complex64 | ~complex128
}
type Integers ¶ added in v0.5.0
type Integers interface {
Integer | UnsignedInteger
}
type Number ¶
type Number interface {
UnsignedInteger | Integer | Decimal
}
Click to show internal directories.
Click to hide internal directories.