Class: Arcade::Velocity
- Inherits:
-
Vector
- Object
- Vector
- Arcade::Velocity
- Defined in:
- lib/arcade/vector.rb
Constant Summary collapse
- HORIZ_REFLECT =
Matrix[[-1,0]
- VERT_REFLECT =
- ZERO =
Instance Method Summary collapse
Instance Method Details
#reflect_horizontally ⇒ Object
7 8 9 |
# File 'lib/arcade/vector.rb', line 7 def reflect_horizontally Arcade::Velocity[*(HORIZ_REFLECT * self).to_a] end |
#reflect_vertically ⇒ Object
11 12 13 |
# File 'lib/arcade/vector.rb', line 11 def reflect_vertically Arcade::Velocity[*(VERT_REFLECT * self).to_a] end |