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.



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

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

#to_vector2Ray::Vector2

Returns Converts an array into a vector2.

Returns:



311
312
313
# File 'lib/ray/vector.rb', line 311

def to_vector2
  Ray::Vector2[*self]
end

#to_vector3Ray::Vector3

Returns Converts an array into a vector3.

Returns:



316
317
318
# File 'lib/ray/vector.rb', line 316

def to_vector3
  Ray::Vector3[*self]
end