Home > @josh-brown/vector > VectorBuilder > fill
Constructs a vector whose entries are all equal to the provided value
Signature:
fill(value: S, dimension: number): V;|
Parameter |
Type |
Description |
|---|---|---|
|
value |
S |
The value to use as the entries of the new vector |
|
dimension |
number |
The dimension of the new vector |
Returns:
V
The new vector
vectorBuilder.fill(3, 5); // [ 3 3 3 3 3 ]