repeatable

package
v0.0.0-...-e059e4b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chance

func Chance(t time.Time, chance float64) bool

Chance is an idempotent call based on a time and a chance in the range (1, 0) it will return true if the result of a fast hash of the time is above a certain percentage (chance) of possible hash values

func Option

func Option(t time.Time, options int) int

Option is an idempotent call based on a time and a number of options If the result of a fast hash of the time is within a certain option-range of possible hash values, it will return that option

func RandDuration

func RandDuration(t time.Time, min, max time.Duration) time.Duration

RandDuration is an idempotent call based on a time and a range of durations it will return a random duration from within that range

func RandShift

func RandShift(t time.Time, min, max, unit float64) float64

RandShift is an idempotent call based on a time and a range of shifts it will return a random shift from within that range unit provides the granularity of the randomness

Types

This section is empty.

Jump to

Keyboard shortcuts

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