ixfx
    Preparing search index...

    Namespace Random

    Totally rando.

    Numbers

    • float Random floating point number within a given range
    • integer Random whole number within a given range Arrays
    • arrayElement Random item from an array (alias of Arrays.randomElement)
    • arrayIndex Random index of an array (alias of Arrays.randomIndex)

    Time

    • minutesMs Random range of minutes, value in milliseconds
    • secondsMs Random range of seconds, value in milliseconds

    Weighted random numbers:

    More

    • hue Random hue - 0..359 number (alias of Visual.Colour.randomHue)
    • string Random string made up of letters and numbers
    • shortGuid Quasi-unique id generator
    // If library is stored two directories up under `ixfx/`
    import {hue as randomHue, string as randomString} from '../../ixfx/dist/random.js';
    // Import from web
    import {hue as randomHue, string as randomString} from 'https://unpkg.com/ixfx/dist/random.js'

    Type Aliases

    GenerateRandomOptions
    RandomOptions
    RandomSource
    StringOptions
    WeightedIntegerOptions
    WeightedOptions

    Functions

    calculateNonZero
    chance
    defaultRandom
    float
    floatSource
    gaussian
    gaussianSource
    integer
    integerSource
    integerUniqueGen
    mersenneTwister
    minutesMs
    minutesMsSource
    secondsMs
    secondsMsSource
    shortGuid
    string
    weighted
    weightedIndex
    weightedInteger
    weightedIntegerSource
    weightedSource

    References

    arrayElement → randomElement
    arrayIndex → randomIndex
    hue → randomHue