SYNOPSIS
This adds TypedArrays of arbitrary length together
INSTALL
npm install typedarray-addition
USAGE
const typedAddition = require('typedarray-addition')
const result = typedAddition.add(new Uint8Array([1, 2, 4]), new Uint8Array([42, 4, 1]))
console.log(result) // [43, 6, 5]
API
add
Adds two typed arrays together. The arrays must be the same bitwidth
Parameters
-
a
TypedArray -
b
TypedArray
Returns TypedArray the result is stored in a new typed array
addn
Adds a typed arrays and a natural number together
Parameters
-
a
TypedArray -
n
Number
Returns TypedArray the result is stored in a new typed array