Documentation ¶
Index ¶
- type Uint128
- func (u Uint128) Add(v Uint128) Uint128
- func (u Uint128) Add64(v uint64) Uint128
- func (u Uint128) And(v Uint128) Uint128
- func (u Uint128) And64(v uint64) Uint128
- func (u Uint128) Big() *big.Int
- func (u Uint128) Cmp(v Uint128) int
- func (u Uint128) Cmp64(v uint64) int
- func (u Uint128) Div(v Uint128) Uint128
- func (u Uint128) Div64(v uint64) Uint128
- func (u Uint128) Equals(v Uint128) bool
- func (u Uint128) Equals64(v uint64) bool
- func (u Uint128) IsZero() bool
- func (u Uint128) Lsh(n uint) (s Uint128)
- func (u Uint128) Mul(v Uint128) Uint128
- func (u Uint128) Mul64(v uint64) Uint128
- func (u Uint128) Or(v Uint128) Uint128
- func (u Uint128) Or64(v uint64) Uint128
- func (u Uint128) PutBytes(b []byte)
- func (u Uint128) QuoRem(v Uint128) (q, r Uint128)
- func (u Uint128) QuoRem64(v uint64) (q Uint128, r uint64)
- func (u Uint128) Rsh(n uint) (s Uint128)
- func (u Uint128) String() string
- func (u Uint128) Sub(v Uint128) Uint128
- func (u Uint128) Sub64(v uint64) Uint128
- func (u Uint128) Xor(v Uint128) Uint128
- func (u Uint128) Xor64(v uint64) Uint128
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Uint128 ¶
type Uint128 struct {
// contains filtered or unexported fields
}
A Uint128 is an unsigned 128-bit number.
var Zero Uint128
Zero is a zero-valued uint128.
func FromBig ¶
FromBig converts i to a Uint128 value. It panics if i is negative or overflows 128 bits.
func (Uint128) Equals ¶
Equals returns true if u == v.
Uint128 values can be compared directly with ==, but use of the Equals method is preferred for consistency.
Click to show internal directories.
Click to hide internal directories.