Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "array/incrspace/docs/types/index.d"

Index

Functions

Functions

incrspace

  • incrspace(x1: number, x2: number, increment?: undefined | number): Array<number>
  • Generates a linearly spaced numeric array using a provided increment.

    throws

    length of created array must be less than 4294967295 (2**32 - 1)

    Parameters

    • x1: number

      first array value

    • x2: number

      array element bound

    • Optional increment: undefined | number

      increment (default: 1)

    Returns Array < number >

    linearly spaced numeric array

    Example

    var arr = incrspace( 0, 11, 2 );
    // returns [ 0, 2, 4, 6, 8, 10 ]