set

fun set(data: Vector4)

Sets all components from another Vector4.

Parameters

data

The Vector4 to copy values from

fun set(x: Float, y: Float, z: Float, w: Float)

Sets all components to the specified values.

Parameters

x

The x component

y

The y component

z

The z component

w

The w component

fun set(index: Int, value: Float)

Sets the component at the specified index.

Parameters

index

The index (0=x, 1=y, 2=z, 3=w)

value

The value to set

Throws

if index is not in range 0,3