Class: Raylib::Quaternion
- Inherits:
-
Object
- Object
- Raylib::Quaternion
- Defined in:
- lib/raylib_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.copy_from(quat) ⇒ Object
163 164 165 |
# File 'lib/raylib_helper.rb', line 163 def self.copy_from(quat) Quaternion.create(quat[:x], quat[:y], quat[:z], quat[:w]) end |
.create(x = 0, y = 0, z = 0, w = 0) ⇒ Object
159 160 161 |
# File 'lib/raylib_helper.rb', line 159 def self.create(x = 0, y = 0, z = 0, w = 0) Quaternion.new.set(x, y, z, w) end |
Instance Method Details
#set(x, y, z, w) ⇒ Object
167 168 169 170 171 172 173 |
# File 'lib/raylib_helper.rb', line 167 def set(x, y, z, w) self[:x] = x self[:y] = y self[:z] = z self[:w] = w self end |
#to_a ⇒ Object
175 176 177 |
# File 'lib/raylib_helper.rb', line 175 def to_a [x, y, z, w] end |