Documentation
¶
Index ¶
- func Add[T core.Numeric | ~string](lhs T, rhs T) T
- func AddAssign[T core.Numeric | ~string](lhs *T, rhs T)
- func And[T ~bool](lhs T, rhs T) T
- func AndAssign[T ~bool](lhs *T, rhs T)
- func BitAnd[T core.Integer](lhs T, rhs T) T
- func BitAndAssign[T core.Integer](lhs *T, rhs T)
- func BitOr[T core.Integer](lhs T, rhs T) T
- func BitOrAssign[T core.Integer](lhs *T, rhs T)
- func BitXor[T core.Integer](lhs T, rhs T) T
- func BitXorAssign[T core.Integer](lhs *T, rhs T)
- func Div[T core.Numeric](lhs T, rhs T) T
- func DivAssign[T core.Numeric](lhs *T, rhs T)
- func Eq[T comparable](lhs T, rhs T) bool
- func Exchange[Lhs, Rhs any](lhs Lhs, rhs Rhs) (Rhs, Lhs)
- func Ge[T core.Ordered](lhs T, rhs T) bool
- func Gt[T core.Ordered](lhs T, rhs T) bool
- func Identify[E any](x E) E
- func LazyTernary[T any](ok bool, lhs func() T, rhs func() T) T
- func Le[T core.Ordered](lhs T, rhs T) bool
- func Lt[T core.Ordered](lhs T, rhs T) bool
- func Max[T core.Ordered](elem T, rest ...T) T
- func Min[T core.Ordered](elem T, rest ...T) T
- func Mul[T core.Numeric](lhs T, rhs T) T
- func MulAssign[T core.Numeric](lhs *T, rhs T)
- func Ne[T comparable](lhs T, rhs T) bool
- func Neg[T core.Numeric](v T) T
- func Not[T ~bool](v T) T
- func NotAssign[T ~bool](v *T)
- func Or[T ~bool](lhs T, rhs T) T
- func OrAssign[T ~bool](lhs *T, rhs T)
- func RangeInteger[T core.Integer](start T, end T) []T
- func Rem[T core.Integer](lhs T, rhs T) T
- func RemAssign[T core.Integer](lhs *T, rhs T)
- func Shl[T core.Integer, S core.Integer](v T, bit S) T
- func ShlAssign[T core.Integer, S core.Integer](v *T, bit S)
- func Shr[T core.Integer, S core.Integer](v T, bit S) T
- func ShrAssign[T core.Integer, S core.Integer](v *T, bit S)
- func Sub[T core.Numeric](lhs T, rhs T) T
- func SubAssign[T core.Numeric](lhs *T, rhs T)
- func Ternary[T any](ok bool, lhs T, rhs T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitAndAssign ¶
BitAndAssign act same as lhs &= rhs in place.
func BitOrAssign ¶
BitOrAssign act same as lhs |= rhs in place.
func BitXorAssign ¶
BitXorAssign act same as lhs ^= rhs in place.
func Eq ¶
func Eq[T comparable](lhs T, rhs T) bool
Eq test two value whether equal or not.
if equal return true, otherwise return false.
func Exchange ¶
func Exchange[Lhs, Rhs any](lhs Lhs, rhs Rhs) (Rhs, Lhs)
Exchange change order of the two value.
func Ge ¶
Ge test whether lhs greater than or equal to rhs value.
if lhs greater than or equal to rhs, return true, otherwise return false.
func Gt ¶
Gt test whether lhs greater than rhs value.
if lhs greater than rhs, return true, otherwise return false.
func LazyTernary ¶ added in v0.4.0
func Le ¶
Le test whether lhs less than or equal to rhs value.
if lhs less than or equal to rhs, return true, otherwise return false.
func Lt ¶
Lt test whether lhs less than rhs value.
if lhs less than rhs, return true, otherwise return false.
func Ne ¶
func Ne[T comparable](lhs T, rhs T) bool
Ne test two values whether equal or not.
if equal return false, otherwise return true.
func RangeInteger ¶
RangeInteger returns a slice that contains all integers in [start, end).
Types ¶
This section is empty.