Class: Vector

Inherits:
Object
  • Object
show all
Defined in:
lib/chem/utils/math.rb

Instance Method Summary collapse

Instance Method Details

#[]=(i, x) ⇒ Object



6
# File 'lib/chem/utils/math.rb', line 6

def []=(i,x) ; @elements[i]=x  ;  end

#xObject



8
# File 'lib/chem/utils/math.rb', line 8

def x        ; @elements[0]    ; end

#x=(x_val) ⇒ Object



12
# File 'lib/chem/utils/math.rb', line 12

def x= x_val ; @elements[0] = x_val ; end

#yObject



9
# File 'lib/chem/utils/math.rb', line 9

def y        ; @elements[1]    ; end

#y=(y_val) ⇒ Object



13
# File 'lib/chem/utils/math.rb', line 13

def y= y_val ; @elements[1] = y_val ; end

#zObject



10
# File 'lib/chem/utils/math.rb', line 10

def z        ; @elements[2]    ; end

#z=(z_val) ⇒ Object



14
# File 'lib/chem/utils/math.rb', line 14

def z= z_val ; @elements[2] = z_val ; end