Creates a new Vector of length length
.
Initially this
Vector contains length
neutral elements:
- always null on dynamic targets
- 0, 0.0 or false for Int, Float and Bool respectively on static
targets
- null for other types on static targets
If length
is less than or equal to 0, the result is unspecified.
Creates a new Vector by copying the elements of array
.
This always creates a copy, even on platforms where the internal representation is Array.
The elements are not copied and retain their identity, so
ai
== Vector.fromArrayCopy(a).get(i) is true for any valid i.
If array
is null, the result is unspecified.
Initializes a new Vector from data
.
Since data
is the internal representation of Vector, this is a no-op.
If data
is null, the corresponding Vector is also null
.