ixfx
    Preparing search index...

    Type Alias StepOptions

    type StepOptions = {
        debug?: boolean;
        forward: boolean;
        loop: StepLoopLogic;
        randomChanceSteps: number;
        randomDirectionFlip: number;
        randomStepsMax: number;
        repeatLoopedIndex: boolean;
        steps: number;
    }
    Index

    Properties

    debug?: boolean
    forward: boolean

    If true increments indexes

    What to do if limit is reached

    randomChanceSteps: number

    If set to 0, does not use a random step length. Otherwise, this sets the chance of calculating a random step length. Eg. if the value is 0.1, 10% of the steps will use a random length. Eg. if the value is 1 every step will generate a random length.

    randomDirectionFlip: number

    Every time a step is taken, we flip the direction if the random number is less this value. Thus, a value of 0 means no random changes. A value of 1 means direction will change every time.

    This can create a 'drunken walk' style of traversal.

    randomStepsMax: number

    The upper bound of random step length. Needs 'randomChanceSteps' to be set to a value greater than 0 to have an effect.

    The range of random steps will thus be between 'steps' and this value.

    repeatLoopedIndex: boolean
    steps: number

    Number of steps to take each time