Documentation
¶
Index ¶
- func And(x, y uint) uint
- func AndNot(x, y uint) uint
- func DivideBy2n(x uint, n int) uint
- func IsDivisibleBy8(x uint) bool
- func IsEven(x uint) bool
- func IsPowerOf2(x uint) bool
- func IsSameSign(x, y int) bool
- func IsSetNth(x uint, n int) bool
- func LeftShift(x uint, n int) uint
- func MultiplyBy2n(x uint, n int) uint
- func Not(x uint) uint
- func Or(x, y uint) uint
- func RightShift(x uint, n int) uint
- func SetNth(x uint, n int) uint
- func ToggleExceptNth(x uint, n int) uint
- func ToggleLeftN(x uint, n int) uint
- func ToggleNth(x uint, n int) uint
- func ToggleRightN(x uint, n int) uint
- func UnsetNth(x uint, n int) uint
- func Xor(x, y uint) uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDivisibleBy8 ¶
IsDivisibleBy8 returns true if x is divisible by 8.
func IsSameSign ¶
IsSameSign returns true if x and y have same signs.
func ToggleExceptNth ¶
ToggleExceptNth returns x with all bits except the nth bit toggled, and n start from 0 and rightmost.
func ToggleLeftN ¶
ToggleLeftN returns x with the leftmost n bits toggled.
func ToggleRightN ¶
ToggleRightN returns x with the rightmost n bits toggled.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.