toVector2

fun PVector.toVector2(): Vector2(source)

Converts this PVector instance into a Vector2 instance.

The x and y components of the PVector are converted to Double and used to create a new Vector2.

Return

A Vector2 instance with the x and y components of this PVector converted to Double.