Class: Raylib::Quaternion

Inherits:
Object
  • Object
show all
Defined in:
lib/raylib_helper.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.copy_from(quat) ⇒ Object



147
148
149
# File 'lib/raylib_helper.rb', line 147

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



143
144
145
# File 'lib/raylib_helper.rb', line 143

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



151
152
153
154
155
156
157
# File 'lib/raylib_helper.rb', line 151

def set(x, y, z, w)
  self[:x] = x
  self[:y] = y
  self[:z] = z
  self[:w] = w
  self
end

#to_aObject



159
160
161
# File 'lib/raylib_helper.rb', line 159

def to_a
  [x, y, z, w]
end