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



120
121
122
# File 'lib/raylib_helper.rb', line 120

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



116
117
118
# File 'lib/raylib_helper.rb', line 116

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



124
125
126
127
128
129
130
# File 'lib/raylib_helper.rb', line 124

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