irange

package
v0.0.0-...-b9e61c6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutator

type Mutator func(intrange.Range) intrange.Range

func Add

func Add(a int) Mutator

Add combines a and f through addition

func And

func And(a, b Mutator) Mutator

And performs two range mutations in order

func Div

func Div(d float64) Mutator

Div divides the input range by d

func DropOut

func DropOut(setTo intrange.Range) Mutator

DropOut resets a range to some default

func EnforceMax

func EnforceMax(mx int) Mutator

func EnforceMin

func EnforceMin(mn int) Mutator

func None

func None() Mutator

None performs no mutation on f

func Or

func Or(a, b Mutator, aChance float64) Mutator

Or will perform a at chance aChance, and otherwise will perform b.

func OrAny

func OrAny(chance float64, muts ...Mutator) Mutator

OrAny will perform one of the given mutations, each with an equal chance. It's anticipated that chance * len(muts) >= 1, if this isn't the case occasionally the mutator will do nothing.

func Scale

func Scale(s float64) Mutator

Scale scales the input range by s

Jump to

Keyboard shortcuts

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