PVector

fun PVector(v: Vector2): PVector(source)

Converts a given Vector2 instance into a PVector instance.

Return

a new PVector instance initialized with the x and y components of the given Vector2, cast to Float.

Parameters

v

the source Vector2 whose x and y coordinates will be used to create the PVector.


fun PVector(v: Vector3): PVector(source)

Converts a Vector3 object into a PVector instance by converting its components to Float.

Return

a PVector instance with corresponding x, y, and z components in Float

Parameters

v

the Vector3 instance to convert