setComponent

fun setComponent(index: Int, value: Double): Vector2

Sets the component at index (0 = x, 1 = y) to value.

Return

A reference to this vector.

Throws

if index is out of range.