Class: GLFW::Vec2

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

Overview

Describes a 2-component floating point vector.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Vec2

Creates a new instance of the GLFW::Vec2 class.

Parameters:

  • x (Float)

    The position on the x-axis.

  • y (Float)

    The position on the y-axis.



190
191
# File 'lib/glfw/stubs.rb', line 190

def initialize(x, y)
end

Instance Attribute Details

#xFloat

Returns the position on the x-axis.

Returns:

  • (Float)

    the position on the x-axis.



180
181
182
# File 'lib/glfw/stubs.rb', line 180

def x
  @x
end

#yFloat

Returns the position on the y-axis.

Returns:

  • (Float)

    the position on the y-axis.



184
185
186
# File 'lib/glfw/stubs.rb', line 184

def y
  @y
end