Luna::Vector::resize

void resize(usize n, const value_type &v)

Resizes the vector.

If the new size is greater than size, new elements will be copy-inserted at the back of the vector using the provided value.

If the new size is smaller than size, size - n elements will be removed from the back of the vector.

If the new size is equal to size, this function does nothing.

Parameters

  • in n

    The new size of the vector.

  • in v

    The initial value to copy for new elements.