ml-spectra-processing
    Preparing search index...

    Function xDoubleTypedArrayLength

    • Copies the values into an array of the same kind of twice the length, the added positions left at zero. A typed array cannot be resized, so a buffer that fills up has to allocate a longer one and copy into it; doubling is what keeps the total cost of filling a buffer of unknown size linear. An empty array becomes one element long, so that doubling it repeatedly makes progress.

      Type Parameters

      • ArrayType extends TypedNumberArray

      Parameters

      Returns ArrayType

      an array of the same kind, twice as long, holding the same values.