Skip to content

Latest commit

 

History

History
79 lines (38 loc) · 929 Bytes

File metadata and controls

79 lines (38 loc) · 929 Bytes

Home > @josh-brown/vector > VectorBuilder > fill

VectorBuilder.fill() method

Constructs a vector whose entries are all equal to the provided value

Signature:

fill(value: S, dimension: number): V;

Parameters

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

Example

vectorBuilder.fill(3, 5); // [ 3 3 3 3 3 ]