Class: Carbuncle::Rect
- Extended by:
- Vectorizable::ClassMethods
- Includes:
- Vectorizable
- Defined in:
- gems/carbuncle-math/mrblib/rect.rb
Overview
Represents a rectangle
Constant Summary
Constants included from Vectorizable
Constants included from Enumerable
Instance Method Summary collapse
Methods included from Vectorizable::ClassMethods
Methods included from Vectorizable
#%, #*, #**, #+, #-, #-@, #/, #<<, #>>, #[], #[]=, #each, #length, #to_s
Methods included from Enumerable
__update_hash, #all?, #any?, #chain, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_h, #uniq, #zip
Instance Method Details
#inspect ⇒ Object
10 11 12 |
# File 'gems/carbuncle-math/mrblib/rect.rb', line 10 def inspect "Rect(#{x}, #{y}, #{w}, #{h})" end |
#size ⇒ Object
14 15 16 |
# File 'gems/carbuncle-math/mrblib/rect.rb', line 14 def size 4 end |
#to_a ⇒ Object
18 19 20 |
# File 'gems/carbuncle-math/mrblib/rect.rb', line 18 def to_a [x, y, w, h] end |