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



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

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



138
139
140
# File 'lib/raylib_helper.rb', line 138

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



146
147
148
149
150
151
152
# File 'lib/raylib_helper.rb', line 146

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

#wObject



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

def w() self[:w] end

#w=(v) ⇒ Object



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

def w=(v) self[:w] = v end

#xObject



154
# File 'lib/raylib_helper.rb', line 154

def x() self[:x] end

#x=(v) ⇒ Object



155
# File 'lib/raylib_helper.rb', line 155

def x=(v) self[:x] = v end

#yObject



156
# File 'lib/raylib_helper.rb', line 156

def y() self[:y] end

#y=(v) ⇒ Object



157
# File 'lib/raylib_helper.rb', line 157

def y=(v) self[:y] = v end

#zObject



158
# File 'lib/raylib_helper.rb', line 158

def z() self[:z] end

#z=(v) ⇒ Object



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

def z=(v) self[:z] = v end