Class: Raylib::Vector2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Vector2
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
Vector2, 2 components
Class Method Summary collapse
Instance Method Summary collapse
- #add(x, y) ⇒ Object
- #add_vector(v) ⇒ Object
- #set(x, y) ⇒ Object
- #to_a ⇒ Object
- #x ⇒ Object
- #x=(v) ⇒ Object
- #y ⇒ Object
- #y=(v) ⇒ Object
Class Method Details
Instance Method Details
#add(x, y) ⇒ Object
82 83 84 85 86 |
# File 'lib/raylib_helper.rb', line 82 def add(x, y) self[:x] = self[:x] + x self[:y] = self[:y] + y self end |
#add_vector(v) ⇒ Object
88 89 90 91 92 |
# File 'lib/raylib_helper.rb', line 88 def add_vector(v) self[:x] = self[:x] + v[:x] self[:y] = self[:y] + v[:y] self end |
#set(x, y) ⇒ Object
76 77 78 79 80 |
# File 'lib/raylib_helper.rb', line 76 def set(x, y) self[:x] = x self[:y] = y self end |
#to_a ⇒ Object
94 95 96 |
# File 'lib/raylib_helper.rb', line 94 def to_a [x, y] end |
#x ⇒ Object
421 |
# File 'lib/raylib_main.rb', line 421 def x = self[:x] |
#x=(v) ⇒ Object
422 |
# File 'lib/raylib_main.rb', line 422 def x=(v) self[:x] = v end |
#y ⇒ Object
423 |
# File 'lib/raylib_main.rb', line 423 def y = self[:y] |
#y=(v) ⇒ Object
424 |
# File 'lib/raylib_main.rb', line 424 def y=(v) self[:y] = v end |