Class: Raylib::Vector2
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Vector2
- Defined in:
- lib/raylib_main.rb,
lib/raylib_helper.rb
Overview
Math helper
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.copy_from(vec) ⇒ Object
69 70 71 |
# File 'lib/raylib_helper.rb', line 69 def self.copy_from(vec) Vector2.create(vec[:x], vec[:y]) end |
.create(x = 0, y = 0) ⇒ Object
65 66 67 |
# File 'lib/raylib_helper.rb', line 65 def self.create(x = 0, y = 0) Vector2.new.set(x, y) end |
Instance Method Details
#set(x, y) ⇒ Object
73 74 75 76 77 |
# File 'lib/raylib_helper.rb', line 73 def set(x, y) self[:x] = x self[:y] = y self end |
#x ⇒ Object
423 |
# File 'lib/raylib_main.rb', line 423 def x = self[:x] |
#x=(v) ⇒ Object
424 |
# File 'lib/raylib_main.rb', line 424 def x=(v) self[:x] = v end |
#y ⇒ Object
425 |
# File 'lib/raylib_main.rb', line 425 def y = self[:y] |
#y=(v) ⇒ Object
426 |
# File 'lib/raylib_main.rb', line 426 def y=(v) self[:y] = v end |