xrand

package
v0.0.0-...-325af03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROBABILITY int32 = 10000
)

Variables

View Source
var RanD random

Functions

func ChooseMN

func ChooseMN(m, n int) []int

choose n from m eg: we have m=10 and n=5, then we will get [1,3,5,7,8]

func RandAnythingOnceFrom

func RandAnythingOnceFrom[S ~[]T, T any](from S) T

func RandAnythingSomeFrom

func RandAnythingSomeFrom[S ~[]T, T any](from S, tar int) S

func RandBetween

func RandBetween(start int64, end int64) int64

func RandDigit

func RandDigit(n int) string

func RandString

func RandString(n int) string

func Wave

func Wave(base int64, lowRate int64, upRate int64) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL