Package bits

Package bits implements bit manipulation functions for predefined unsigned integer types.

Constants

This section is empty.

Variables

This section is empty.

Functions

func RotateLeft
func RotateLeft(x uint, k int) uint

RotateLeft rotates x left by (k mod size(x)) bits. To rotate right by k bits, call RotateLeft(x, -k).

func RotateLeft16
func RotateLeft16(x uint16, k int) uint16

RotateLeft16 rotates x left by (k mod 16) bits. To rotate right by k bits, call RotateLeft16(x, -k).

func RotateLeft32
func RotateLeft32(x uint32, k int) uint32

RotateLeft32 rotates x left by (k mod 32) bits. To rotate right by k bits, call RotateLeft32(x, -k).

func RotateLeft64
func RotateLeft64(x uint64, k int) uint64

RotateLeft64 rotates x left by (k mod 64) bits. To rotate right by k bits, call RotateLeft64(x, -k).

Types

This section is empty.