Class: Chobo::Vec2

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x = 0.0, y = 0.0) ⇒ Vec2

Returns a new instance of Vec2.



5
6
7
# File 'lib/chobo/vec2.rb', line 5

def initialize x = 0.0, y = 0.0
	@x, @y = x, y
end

Instance Attribute Details

#xObject

Returns the value of attribute x.



3
4
5
# File 'lib/chobo/vec2.rb', line 3

def x
  @x
end

#yObject

Returns the value of attribute y.



3
4
5
# File 'lib/chobo/vec2.rb', line 3

def y
  @y
end