Documentation ¶
Index ¶
- func Bool2Int(b bool) int
- func CmpComparable[T comparable](a, b T) int
- func CmpOrdered[T constraints.Ordered](a, b T) int
- func Max[T constraints.Ordered](a, b T) T
- func MaxWithCmp[T any](a, b T, cmp Comparator[T]) T
- func Min[T constraints.Ordered](a, b T) T
- func MinWithCmp[T any](a, b T, cmp Comparator[T]) T
- type Comparator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpComparable ¶
func CmpComparable[T comparable](a, b T) int
func CmpOrdered ¶
func CmpOrdered[T constraints.Ordered](a, b T) int
func Max ¶
func Max[T constraints.Ordered](a, b T) T
func MaxWithCmp ¶
func MaxWithCmp[T any](a, b T, cmp Comparator[T]) T
func Min ¶
func Min[T constraints.Ordered](a, b T) T
func MinWithCmp ¶
func MinWithCmp[T any](a, b T, cmp Comparator[T]) T
Types ¶
type Comparator ¶
func ReverseCmp ¶
func ReverseCmp[T any](cmp Comparator[T]) Comparator[T]
func SliceCmp ¶
func SliceCmp[T any](cmp Comparator[T]) Comparator[[]T]
Click to show internal directories.
Click to hide internal directories.