Documentation ¶
Index ¶
- func Copy(from byte, start, finish uint8) byte
- func CopyMatrix(in [][]byte) [][]byte
- func CopyPaste(from, to, mask byte) byte
- func CopyPasteRow(fromRow, toRow []byte, fromStartIdx, toStartIdx, width int) []byte
- func CreateByteFromString(bt string) byte
- func CreateBytesFromString(bts string) []byte
- func Float64ToBytes(num float64) []byte
- func Graph(matrix [][]byte, fx grapher) [][]byte
- func IsSet(bt byte, i uint8) bool
- func IsSetInRow(row []byte, i int) bool
- func NewCopyPasteMask(start, stop uint8) byte
- func NewSimpleCopyPasteMask(index uint8) byte
- func PasteRight(from, to byte, start uint8) byte
- func PrintMatrix(matrix [][]byte)
- func Set(bt byte, i uint8) byte
- func SetInRow(row []byte, i int) []byte
- func ShiftDown(matrix [][]byte, index float64, count float64) [][]byte
- func ShiftLeft(bytes []byte, count float64) []byte
- func ShiftRight(bytes []byte, count float64) []byte
- func ShiftUp(matrix [][]byte, index float64, count float64) [][]byte
- func SinWave(matrix [][]byte, yStart, widthCoef float64) [][]byte
- func SinWaveFunky(matrix [][]byte, yStart, cosCoef, sinCoef float64) [][]byte
- func SpiralBottomLeft(matrix [][]byte) [][]byte
- func SpiralBottomRight(matrix [][]byte) [][]byte
- func SpiralTopLeft(matrix [][]byte) [][]byte
- func SpiralTopRight(matrix [][]byte) [][]byte
- func SprintBytes(bts []byte) string
- func SwapHorizontal(matrix [][]byte, xStart, yStart, singleSectionWidth, height int) [][]byte
- func SwapVertical(matrix [][]byte, xStart, yStart, width, singleSectionHeight int) [][]byte
- func Toggle(bt byte, index uint8) byte
- func ToggleColumn(matrix [][]byte, index float64) [][]byte
- func ToggleColumnSection(matrix [][]byte, col float64, start, end int) [][]byte
- func ToggleColumns(data [][]byte, start, end int) [][]byte
- func ToggleColumnsSections(matrix [][]byte, start, end float64, yStart, yEnd int) [][]byte
- func ToggleRow(data []byte) []byte
- func ToggleRowSection(data []byte, start, end int) []byte
- func ToggleRows(data [][]byte, start, end int) [][]byte
- func ToggleRowsSections(data [][]byte, start, end, xStart, xEnd int) [][]byte
- func ToggleUsingFloat64(matrix [][]byte, f float64) [][]byte
- func ToggleUsingUint64(matrix [][]byte, u uint64) [][]byte
- func Uint64ToBytes(num uint64) []byte
- func Unset(bt byte, i uint8) byte
- func UnsetInRow(row []byte, i int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy creates a new byte with the bits from start to finish copied and the rest of the bits as zeros
func CopyPaste ¶
CopyPaste takes bit 'from' and copies all bits where 1's are found in the mask onto byte 'to'.
func CopyPasteRow ¶
CopyPasteRow takes all the bits of a defined section in a byte slice and pastes them onto an equal length section of another byte slice
func CreateByteFromString ¶
CreateByteFromString takes a string of 1's and 0's and creates a byte. Must not be more than 8 characters
func CreateBytesFromString ¶
CreateBytesFromString takes a string of 1's and 0's and creates a slice of bytes.
func Float64ToBytes ¶
Float64ToBytes converts a float64 into it's constituent bytes in big endian format
func IsSetInRow ¶
IsSetInRow checks if the bit at i in a slice of bits is set
func NewCopyPasteMask ¶
NewCopyPasteMask creates a bit mask in which the selected range is composed of 1's and the rest is composed of zeros. Both indexes are included.
func NewSimpleCopyPasteMask ¶
NewSimpleCopyPasteMask creates a bit mask in which one selected bit at 'index' is a 1 and the rest of the byte is composed of zeros.
func PasteRight ¶
PasteRight pastes a result of Copy (or any byte section in which the rest of the byte contains only zeros) to the right side of byte 'to', starting at index 'start'
func PrintMatrix ¶
func PrintMatrix(matrix [][]byte)
PrintMatrix prints a matrix of bytes in an easy to view checkerboard format
func ShiftDown ¶
ShiftDown takes a matrix of bytes and shifts a column of bits down by 'count'. Bits pushed off the bottom are rotated back around to the top. Each slice in the matrix is expected to be the same length.
func ShiftLeft ¶
ShiftLeft takes an array of bytes lined up horizontally, bit to bit, and shifts the whole array left by 'count'. Bits pushed off the left edge are rotated to the right side.
func ShiftRight ¶
ShiftRight takes an array of bytes lined up horizontally, bit to bit, and shifts the whole array right by 'count'. Bits pushed off the right edge are rotated to the left side.
func ShiftUp ¶
ShiftUp takes a matrix of bytes and shifts a column of bits up by 'count'. Bits pushed off the top are rotated back around to the bottom. Each slice in the matrix is expected to be the same length.
func SinWaveFunky ¶
SinWaveFunky toggles a variable width sine wave on a byte matrix
func SpiralBottomLeft ¶
SpiralBottomLeft toggles bits of a byte matrix in a spiral starting at the bottom left and going clockwise
func SpiralBottomRight ¶
SpiralBottomRight toggles bits of a byte matrix in a spiral starting at the bottom right and going clockwise
func SpiralTopLeft ¶
SpiralTopLeft toggles bits of a byte matrix in a spiral starting at the top left and going clockwise
func SpiralTopRight ¶
SpiralTopRight toggles bits of a byte matrix in a spiral starting at the top right and going clockwise
func SprintBytes ¶
SprintBytes returns the string representation of a byte slice
func SwapHorizontal ¶
SwapHorizontal takes a matrix of bytes and swaps a section from left to right.
func SwapVertical ¶
SwapVertical takes a matrix of bytes and swaps a section from bottom to top.
func ToggleColumn ¶
ToggleColumn toggles all the bits in the selected column of a byte matrix
func ToggleColumnSection ¶
ToggleColumnSection toggles all the bits in the selected column of a byte matrix from start to end
func ToggleColumns ¶
ToggleColumns toggles all the bits in the columns of the byte matrix selected by start and end
func ToggleColumnsSections ¶
ToggleColumnsSections toggles all the bits in the byte array columns selected by start and end for a specific section
func ToggleRowSection ¶
ToggleRowSection toggles all of the bits from start to end bit index in a byte array
func ToggleRows ¶
ToggleRows toggles all the bits in the byte array rows selected by start and end
func ToggleRowsSections ¶
ToggleRowsSections toggles all the bits in the byte array rows selected by start and end for a specific section
func ToggleUsingFloat64 ¶
ToggleUsingFloat64 takes the bytes in a given float and uses them as masks to toggle values across a matrix
func ToggleUsingUint64 ¶
ToggleUsingUint64 takes the bytes in a given uint and uses them as masks to toggle values across a matrix
func Uint64ToBytes ¶
Uint64ToBytes converts a uint64 into it's constituent bytes in big endian format
func UnsetInRow ¶
UnsetInRow makes the bit at i in a slice of bits 0
Types ¶
This section is empty.