Class: RetroRender::Vector3

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x = 0.0, y = 0.0, z = 0.0) ⇒ Vector3

Returns a new instance of Vector3.

Parameters:

  • x (Float) (defaults to: 0.0)
  • y (Float) (defaults to: 0.0)
  • z (Float) (defaults to: 0.0)


65
66
67
# File 'lib/retro_render.rb', line 65

def initialize(x = 0.0, y = 0.0, z = 0.0)
	@x, @y, @z = x, y, z
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



61
62
63
# File 'lib/retro_render.rb', line 61

def x
  @x
end

#yObject

Returns the value of attribute y.



61
62
63
# File 'lib/retro_render.rb', line 61

def y
  @y
end

#zObject

Returns the value of attribute z.



61
62
63
# File 'lib/retro_render.rb', line 61

def z
  @z
end