from

fun from(vec: Vector2<*>): Vec2(source)

Creates a Vec2 from a generic Vector2.

Return

A new Vec2 instance with the same components as the input vector.

Parameters

vec

The generic vector to convert.