extensions/pdfViewer/pdf/build/pdf.js
function pm(m) {
    if (m[4] === 0 && m[5] === 0) {
      if (m[1] === 0 && m[2] === 0) {
        if (m[0] === 1 && m[3] === 1) {
          return '';
        }
        return 'scale(' + pf(m[0]) + ' ' + pf(m[3]) + ')';
      }
      if (m[0] === m[3] && m[1] === -m[2]) {
        var a = Math.acos(m[0]) * 180 / Math.PI;
        return 'rotate(' + pf(a) + ')';
      }
    } else {
      if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {
        return 'translate(' + pf(m[4]) + ' ' + pf(m[5]) + ')';
      }
    }
    return 'matrix(' + pf(m[0]) + ' ' + pf(m[1]) + ' ' + pf(m[2]) + ' ' +
      pf(m[3]) + ' ' + pf(m[4]) + ' ' + pf(m[5]) + ')';
  }
function pm(m) {
    if (m[4] === 0 && m[5] === 0) {
      if (m[1] === 0 && m[2] === 0) {
        if (m[0] === 1 && m[3] === 1) {
          return '';
        }
        return 'scale(' + pf(m[0]) + ' ' + pf(m[3]) + ')';
      }
      if (m[0] === m[3] && m[1] === -m[2]) {
        var a = Math.acos(m[0]) * 180 / Math.PI;
        return 'rotate(' + pf(a) + ')';
      }
    } else {
      if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {
        return 'translate(' + pf(m[4]) + ' ' + pf(m[5]) + ')';
      }
    }
    return 'matrix(' + pf(m[0]) + ' ' + pf(m[1]) + ' ' + pf(m[2]) + ' ' +
      pf(m[3]) + ' ' + pf(m[4]) + ' ' + pf(m[5]) + ')';
  }
function pm ( m ) { if ( m [ 4 ] === 0 && m [ 5 ] === 0 ) { if ( m [ 1 ] === 0 && m [ 2 ] === 0 ) { if ( m [ 0 ] === 1 && m [ 3 ] === 1 ) { return '' ; } return 'scale(' + pf ( m [ 0 ] ) + ' ' + pf ( m [ 3 ] ) + ')' ; } if ( m [ 0 ] === m [ 3 ] && m [ 1 ] === - m [ 2 ] ) { var a = Math . acos ( m [ 0 ] ) * 180 / Math . PI ; return 'rotate(' + pf ( a ) + ')' ; } } else { if ( m [ 0 ] === 1 && m [ 1 ] === 0 && m [ 2 ] === 0 && m [ 3 ] === 1 ) { return 'translate(' + pf ( m [ 4 ] ) + ' ' + pf ( m [ 5 ] ) + ')' ; } } return 'matrix(' + pf ( m [ 0 ] ) + ' ' + pf ( m [ 1 ] ) + ' ' + pf ( m [ 2 ] ) + ' ' + pf ( m [ 3 ] ) + ' ' + pf ( m [ 4 ] ) + ' ' + pf ( m [ 5 ] ) + ')' ; }
Formats transform matrix. The standard rotation, scale and translate
matrices are replaced by their shorter forms, and for identity matrix
returns empty string to save the memory.
@param m {Array} matrix to format.
@returns {string}
Formats transform matrix . The standard rotation scale and translate matrices are replaced by their shorter forms and for identity matrix returns empty string to save the memory .