Method: MiniGL::Vector#initialize

Defined in:
lib/minigl/global.rb

#initialize(x = 0, y = 0) ⇒ Vector

Creates a new bidimensional vector.

Parameters:

x

The x coordinate of the vector

y

The y coordinate of the vector



18
19
20
21
# File 'lib/minigl/global.rb', line 18

def initialize(x = 0, y = 0)
  @x = x
  @y = y
end