vec2
Constructs a new Vector2 instance. An equivalent of Vector2 constructor that supports Kotlin syntax features: named parameters with default values.
Return
a new Vector2 instance storing the passed values.
Parameters
x
the X component. Defaults to 0f.
y
the Y component. Defaults to 0f.