Documentation
¶
Index ¶
- func And(a bool, b bool) bool
- func BitwiseAnd[T constraints.Integer](a T, b T) T
- func BitwiseAndNot[T constraints.Integer](a T, b T) T
- func BitwiseOr[T constraints.Integer](a T, b T) T
- func BitwiseXor[T constraints.Integer](a T, b T) T
- func Dereference[A any](a *A) A
- func Divide[T Number](a T, b T) T
- func EQ[T comparable](a T, b T) bool
- func GT[T constraints.Ordered](a T, b T) bool
- func GTE[T constraints.Ordered](a T, b T) bool
- func Index[A any](i int, xs []A) A
- func LT[T constraints.Ordered](a T, b T) bool
- func LTE[T constraints.Ordered](a T, b T) bool
- func LeftShift[T constraints.Integer](bits T, numberOfBits uint) T
- func MapGet[A comparable, B any](a A, m map[A]B) B
- func Max[T constraints.Ordered](a T, b T) T
- func Min[T constraints.Ordered](a T, b T) T
- func Minus[T Number](a T, b T) T
- func Modulo[T constraints.Integer](a T, b T) T
- func NE[T comparable](a T, b T) bool
- func Negate[T Number](a T) T
- func Not(a bool) bool
- func Or(a bool, b bool) bool
- func Plus[T Number](a T, b T) T
- func Reference[A any](a A) *A
- func RightShift[T constraints.Integer](bits T, numberOfBits uint) T
- func Slice[A any](start uint, stop uint, xs []A) []A
- func SliceFrom[A any](start uint, xs []A) []A
- func SliceTo[A any](stop uint, xs []A) []A
- func Times[T Number](a T, b T) T
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitwiseAnd ¶
func BitwiseAnd[T constraints.Integer](a T, b T) T
func BitwiseAndNot ¶
func BitwiseAndNot[T constraints.Integer](a T, b T) T
BitwiseAndNot wraps the `&^` operator
func BitwiseOr ¶
func BitwiseOr[T constraints.Integer](a T, b T) T
func BitwiseXor ¶
func BitwiseXor[T constraints.Integer](a T, b T) T
func Dereference ¶
func Dereference[A any](a *A) A
func EQ ¶
func EQ[T comparable](a T, b T) bool
func GT ¶
func GT[T constraints.Ordered](a T, b T) bool
func GTE ¶
func GTE[T constraints.Ordered](a T, b T) bool
func LT ¶
func LT[T constraints.Ordered](a T, b T) bool
func LTE ¶
func LTE[T constraints.Ordered](a T, b T) bool
func LeftShift ¶
func LeftShift[T constraints.Integer](bits T, numberOfBits uint) T
func MapGet ¶
func MapGet[A comparable, B any](a A, m map[A]B) B
func Max ¶ added in v0.2.3
func Max[T constraints.Ordered](a T, b T) T
func Min ¶ added in v0.2.3
func Min[T constraints.Ordered](a T, b T) T
func Modulo ¶
func Modulo[T constraints.Integer](a T, b T) T
func NE ¶
func NE[T comparable](a T, b T) bool
func RightShift ¶
func RightShift[T constraints.Integer](bits T, numberOfBits uint) T
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
Number is built out of:
https://pkg.go.dev/golang.org/x/exp@v0.0.0-20220706164943-b4a6d9510983/constraints
Click to show internal directories.
Click to hide internal directories.