Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtLeast ¶ added in v1.6.3
func AtLeast[T Numerical](x, lower T) T
AtLeast returns the greater of x or lower.
func AtMost ¶ added in v1.6.3
func AtMost[T Numerical](x, upper T) T
AtMost returns the smaller of x or upper.
Types ¶
type Proba ¶
type Proba struct {
// contains filtered or unexported fields
}
A Proba is used to test if true on given probability.
func (*Proba) TrueOnProba ¶
TrueOnProba checks if true on given probability.
type Unstable ¶
type Unstable struct {
// contains filtered or unexported fields
}
An Unstable is used to generate random value around the mean value base on given deviation.
func (Unstable) AroundDuration ¶
AroundDuration returns a random duration with given base and deviation.
Click to show internal directories.
Click to hide internal directories.