Class: Raylib::Vector4
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Vector4
- Defined in:
- lib/raylib/core/structs/vector4.rb
Overview
Vector4, 4 components
Class Method Summary collapse
Instance Method Summary collapse
- #to_s ⇒ Object
-
#w ⇒ Float
Vector w component.
-
#w=(new_w) ⇒ Object
Sets Vector w component.
-
#x ⇒ Float
Vector x component.
-
#x=(new_x) ⇒ Object
Sets Vector x component.
-
#y ⇒ Float
Vector y component.
-
#y=(new_y) ⇒ Object
Sets Vector y component.
-
#z ⇒ Float
Vector z component.
-
#z=(new_z) ⇒ Object
Sets Vector z component.
Class Method Details
.create(x, y, z, w) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/raylib/core/structs/vector4.rb', line 11 def self.create(x, y, z, w) new.tap do |instance| instance[:x] = x instance[:y] = y instance[:z] = z instance[:w] = w end end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/raylib/core/structs/vector4.rb', line 20 def to_s "Raylib::Vector4##{object_id} x=#{x} y=#{y} z=#{z} w=#{w}" end |
#w ⇒ Float
Vector w component
53 |
# File 'lib/raylib/core/structs/vector4.rb', line 53 def w = self[:w] |
#w=(new_w) ⇒ Object
Sets Vector w component
56 57 58 |
# File 'lib/raylib/core/structs/vector4.rb', line 56 def w=(new_w) self[:w] = new_w end |
#x ⇒ Float
Vector x component
26 |
# File 'lib/raylib/core/structs/vector4.rb', line 26 def x = self[:x] |
#x=(new_x) ⇒ Object
Sets Vector x component
29 30 31 |
# File 'lib/raylib/core/structs/vector4.rb', line 29 def x=(new_x) self[:x] = new_x end |
#y ⇒ Float
Vector y component
35 |
# File 'lib/raylib/core/structs/vector4.rb', line 35 def y = self[:y] |
#y=(new_y) ⇒ Object
Sets Vector y component
38 39 40 |
# File 'lib/raylib/core/structs/vector4.rb', line 38 def y=(new_y) self[:y] = new_y end |
#z ⇒ Float
Vector z component
44 |
# File 'lib/raylib/core/structs/vector4.rb', line 44 def z = self[:z] |
#z=(new_z) ⇒ Object
Sets Vector z component
47 48 49 |
# File 'lib/raylib/core/structs/vector4.rb', line 47 def z=(new_z) self[:z] = new_z end |