Module: Indexable::XYZ
- Defined in:
- lib/sixarm_ruby_geometry/indexable/xyz.rb
Instance Method Summary collapse
-
#x ⇒ Object
Get x.
-
#x=(x) ⇒ Object
Set x.
-
#y ⇒ Object
Get y.
-
#y=(y) ⇒ Object
Set y.
-
#z ⇒ Object
Get z.
-
#z=(z) ⇒ Object
Set z.
Instance Method Details
#x ⇒ Object
Get x.
10 11 12 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 10 def x self[0] end |
#x=(x) ⇒ Object
Set x.
15 16 17 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 15 def x=(x) self[0]=x end |
#y ⇒ Object
Get y.
20 21 22 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 20 def y self[1] end |
#y=(y) ⇒ Object
Set y.
25 26 27 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 25 def y=(y) self[1]=y end |
#z ⇒ Object
Get z.
30 31 32 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 30 def z self[2] end |
#z=(z) ⇒ Object
Set z.
35 36 37 |
# File 'lib/sixarm_ruby_geometry/indexable/xyz.rb', line 35 def z=(z) self[2]=z end |