Method: RMath3D::RMtx2#setElements
- Defined in:
- lib/rmath3d/rmath3d_plain.rb
#setElements(*a) ⇒ Object
call-seq: setElements( e0, e1, e2, e3 )
Stores given 4 new values.
104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/rmath3d/rmath3d_plain.rb', line 104 def setElements( *a ) if a.length != 4 raise RuntimeError, "RMtx2#setElements : wrong # of arguments (#{a.length})" return nil end for row in 0...2 do for col in 0...2 do index = 2*row + col setElement( row, col, a[index] ) end end end |