Module: Chem::Transform::TwoDimension

Included in:
CDK::CDKAtom, ThreeDimension
Defined in:
lib/chem/utils/transform.rb

Instance Method Summary collapse

Instance Method Details

#posObject

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

#xObject



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

#yObject



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