core: v2ray.com/core/common/dice Index | Files

package dice

import "v2ray.com/core/common/dice"

Package dice contains common functions to generate random number. It also initialize math/rand with the time in seconds at launch time.

Index

Package Files

dice.go

func Roll Uses

func Roll(n int) int

Roll returns a non-negative number between 0 (inclusive) and n (exclusive).

func RollUint16 Uses

func RollUint16() uint16

RollUint16 returns a random uint16 value.

Package dice imports 2 packages (graph) and is imported by 51 packages. Updated 2018-05-21. Refresh now. Tools for package owners.