unif

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package unif provides functions to simplify generation of random values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool() bool

Bool generates a uniformly random boolean value.

func BoundedInt

func BoundedInt(a int, allowZero bool) int

BoundedInt generates a uniformly random integer in [-a,a].

func IntInInterval

func IntInInterval(a, b int, allowZero bool) int

IntInInterval generates a uniformly random integer in [a,b]. If a>b, the function panics

Types

This section is empty.

Jump to

Keyboard shortcuts

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