Documentation
¶
Index ¶
- func IsEmpty[T comparable](t T) bool
- func Num2Bool[T BasicNumberUnion](t Number[T]) bool
- func Num2Str[T BasicNumberUnion](t Number[T]) string
- func Str2Num[T BasicNumberUnion](s string, n Number[T]) (T, error)
- type BasicNumberUnion
- type BigFloat
- type BigInt
- type BigNumberUnion
- type C128
- type C64
- type ComplexUnion
- type F32
- type F64
- type FloatUnion
- type I16
- type I32
- type I64
- type I8
- type Int
- type IntUnion
- type Number
- type NumberUnion
- type U16
- type U32
- type U64
- type U8
- type Uint
- type UintUnion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmpty ¶
func IsEmpty[T comparable](t T) bool
func Num2Bool ¶
func Num2Bool[T BasicNumberUnion](t Number[T]) bool
func Num2Str ¶
func Num2Str[T BasicNumberUnion](t Number[T]) string
Types ¶
type BasicNumberUnion ¶
type BasicNumberUnion interface { IntUnion | UintUnion | FloatUnion }
type C128 ¶
type C128 complex128
func (*C128) Box ¶
func (c *C128) Box(t complex128)
func (*C128) UnBox ¶
func (c *C128) UnBox() complex128
type ComplexUnion ¶
type ComplexUnion interface { ~complex64 | ~complex128 }
type FloatUnion ¶
type Number ¶
type Number[T NumberUnion] interface { String() string Parse(str string) error Bool() bool // convert number to bool Box(T) UnBox() T }
type NumberUnion ¶
type NumberUnion interface { BasicNumberUnion | ComplexUnion | BigNumberUnion }
Click to show internal directories.
Click to hide internal directories.