Documentation ¶
Index ¶
- func AdjacentEqual64(a, b float64) bool
- func Close64(a, b float64, tolerance float64) bool
- func Equiv64(a, b float64) bool
- func EquivOrCloseFloat64(a, b float64, tolerance float64) bool
- func FillRandomByteSlice(buf []byte, rng Rand)
- func Printable(rng Rand) byte
- func RandomByteSlice(n int, rng Rand) []byte
- func RandomByteSlices(m, n int, rng Rand) [][]byte
- func Shuffle(buf [][]byte, rng Rand)
- func ShuffleRepeated(n int, src [][]byte, rng Rand) [][]byte
- type Rand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjacentEqual64 ¶
AdjacentEqual64 reports whether a equals b or they are adjacent floating point numbers.
func Equiv64 ¶
Equiv64 reports whether two 64-bit floats are equivalent. It returns true if they are both infinite, NaN or numerically equal to one another.
func EquivOrCloseFloat64 ¶
EquivOrCloseFloat64 reports whether two 64-bit floats are equivalent. It returns true if they are both infinite, NaN or numerically equal within a given tolerance.
func FillRandomByteSlice ¶
FillRandomByteSlice fills a byte slice with n random bytes using rng as the source of randomness.
func RandomByteSlice ¶
RandomByteSlice creates a byte slice filled with n random bytes using rng as the source of randomness.
func RandomByteSlices ¶
RandomByteSlices creates m byte slices each filled with n random bytes using rng as the source of randomness.
func ShuffleRepeated ¶
ShuffleRepeated returns n byte slices drawn randomly from src. If n is larger than len(src) then it will draw entries at random from src to fill the spare space ensuring that each entry from src appears at least once.