Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/ray/rect.rb,
lib/ray/vector.rb

Instance Method Summary collapse

Instance Method Details

#to_rectRay::Rect

Returns Converts an array to a rect.

Returns:

  • (Ray::Rect)

    Converts an array to a rect.



106
107
108
# File 'lib/ray/rect.rb', line 106

def to_rect
  Ray::Rect.new(*self)
end

#to_vector2Ray::Vector2

Returns Converts an array into a vector2.

Returns:



293
294
295
# File 'lib/ray/vector.rb', line 293

def to_vector2
  Ray::Vector2[*self]
end

#to_vector3Ray::Vector3

Returns Converts an array into a vector3.

Returns:



298
299
300
# File 'lib/ray/vector.rb', line 298

def to_vector3
  Ray::Vector3[*self]
end