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
98 99 100 101 102 |
# File 'lib/raylib_helper.rb', line 98 def add(x, y) self[:x] = self[:x] + x self[:y] = self[:y] + y self end |
#add_vector(v) ⇒ Object
104 105 106 107 108 |
# File 'lib/raylib_helper.rb', line 104 def add_vector(v) self[:x] = self[:x] + v[:x] self[:y] = self[:y] + v[:y] self end |
#set(x, y) ⇒ Object
92 93 94 95 96 |
# File 'lib/raylib_helper.rb', line 92 def set(x, y) self[:x] = x self[:y] = y self end |
#to_a ⇒ Object
110 111 112 |
# File 'lib/raylib_helper.rb', line 110 def to_a [x, y] end |
#x ⇒ Object
428 |
# File 'lib/raylib_main.rb', line 428 def x = self[:x] |
#x=(v) ⇒ Object
429 |
# File 'lib/raylib_main.rb', line 429 def x=(v) self[:x] = v end |
#y ⇒ Object
430 |
# File 'lib/raylib_main.rb', line 430 def y = self[:y] |
#y=(v) ⇒ Object
431 |
# File 'lib/raylib_main.rb', line 431 def y=(v) self[:y] = v end |