home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / baku100.zip / baku100 / Kernel / Util / Matrix.tonyu < prev    next >
Text File  |  2003-01-04  |  350b  |  25 lines

  1. extends Array;
  2.  
  3. constructor Matrix(c) {
  4.   super();
  5.   cols=c;
  6. }
  7.  
  8. function addRows(r) {
  9.   var x,y;
  10.   for (y=0 ; y<r ; y++) {
  11.    for (x=0 ; x<cols ; x++) add(null);
  12.   }
  13. }
  14.  
  15. function rowCount() {
  16.   
  17. }
  18.  
  19. function get(x,y) {
  20.   return super.get(trunc(x)+trunc(y)*cols);
  21. }
  22.  
  23. function set(x,y,t) {
  24.   super.set(trunc(x)+trunc(y)*cols,t);
  25. }