Module: Chem::Transform::TwoDimension
- Included in:
- CDK::CDKAtom, ThreeDimension
- Defined in:
- lib/chem/utils/transform.rb
Instance Method Summary collapse
-
#pos ⇒ Object
attr_reader :pos def initialize super @pos = Vector[0.0, 0.0] end.
- #x ⇒ Object
- #x=(x_val) ⇒ Object
- #y ⇒ Object
- #y=(y_val) ⇒ Object
Instance Method Details
#pos ⇒ Object
attr_reader :pos
def initialize
super
@pos = Vector[0.0, 0.0]
end
17 |
# File 'lib/chem/utils/transform.rb', line 17 def pos ; @pos ||= Vector[@x, @y, @z] ; end |
#x ⇒ Object
18 |
# File 'lib/chem/utils/transform.rb', line 18 def x ; pos[0] ; end |
#x=(x_val) ⇒ Object
20 |
# File 'lib/chem/utils/transform.rb', line 20 def x=(x_val) ; pos[0] = x_val ; end |
#y ⇒ Object
19 |
# File 'lib/chem/utils/transform.rb', line 19 def y ; pos[1] ; end |
#y=(y_val) ⇒ Object
21 |
# File 'lib/chem/utils/transform.rb', line 21 def y=(y_val) ; pos[1] = y_val ; end |