unaryMinus

operator fun unaryMinus(): Vector2

Returns the negation of this Vector2 instance, changing (x, y) to (-x, -y).

Return

A new Vector2 instance with components (-x, -y).