class SFML::Vector2

2D vector with float components. Operator-friendly and pattern-matchable.

v = SFML::Vector2[3, 4] v.length #=> 5.0 v + Vector2[1, 1] #=> Vector2(4, 5) v * 2 #=> Vector2(6, 8) x, y = v # destructures via to_a