transformPoints(array) {
    let vec,
      i,
      j,
      k,
      m,
      e = this._elements,
      ret = [];

    for (k = 0; k < array.length; k++) {
      vec = [array[k].x, array[k].y, 1];
      m = [0, 0, 0];

      for (i = 0; i < this._elements.length; i++) {
        // row
        for (j = 0; j < this._elements[i].length; j++) {
          // column
          m[i] += vec[j] * e[i][j];
        }
      }
      ret.push({ x: m[0], y: m[1] });
    }
    return ret;
  }
/**
   * Transforms the given points by this matrix and returns the new points
   */
Transforms the given points by this matrix and returns the new points
Transforms the given points by this matrix and returns the new points
transformPoints(array) {
    let vec,
      i,
      j,
      k,
      m,
      e = this._elements,
      ret = [];
    for (k = 0; k < array.length; k++) {
      vec = [array[k].x, array[k].y, 1];
      m = [0, 0, 0];
      for (i = 0; i < this._elements.length; i++) {
        for (j = 0; j < this._elements[i].length; j++) {
          m[i] += vec[j] * e[i][j];
        }
      }
      ret.push({ x: m[0], y: m[1] });
    }
    return ret;
  }
transformPoints ( array ) { let vec , i , j , k , m , e = this . _elements , ret = [ ] ; for ( k = 0 ; k < array . length ; k ++ ) { vec = [ array [ k ] . x , array [ k ] . y , 1 ] ; m = [ 0 , 0 , 0 ] ; for ( i = 0 ; i < this . _elements . length ; i ++ ) { for ( j = 0 ; j < this . _elements [ i ] . length ; j ++ ) { m [ i ] += vec [ j ] * e [ i ] [ j ] ; } } ret . push ( { x : m [ 0 ] , y : m [ 1 ] } ) ; } return ret ; }
Transforms the given points by this matrix and returns the new points
Transforms the given points by this matrix and returns the new points
// row // column