public void addScaling(double scale) {
    // invalidate inverse
    inv = null;
    // Note: last ROW is not included.
    for(int i = 0; i < dim; i++) {
      for(int j = 0; j <= dim; j++) {
        trans[i][j] = trans[i][j] * scale;
      }
    }
    // As long as relative vectors aren't used, this would also work:
    // trans[dim][dim] = trans[dim][dim] / scale;
  }
public void addScaling ( double scale ) { inv = null ; for ( int i = 0 ; i < dim ; i ++ ) { for ( int j = 0 ; j <= dim ; j ++ ) { trans [ i ] [ j ] = trans [ i ] [ j ] * scale ; } } }
Simple linear (symmetric) scaling.

@param scale Scaling factor