polynomial.js
function degree(x) {

    var i = Number.NEGATIVE_INFINITY;

    for (var k in x) {
      if (!FIELD['empty'](x[k]))
        i = Math.max(k, i);
    }
    return i;
  }
function degree(x) {

    var i = Number.NEGATIVE_INFINITY;

    for (var k in x) {
      if (!FIELD['empty'](x[k]))
        i = Math.max(k, i);
    }
    return i;
  }
function degree ( x ) { var i = Number . NEGATIVE_INFINITY ; for ( var k in x ) { if ( ! FIELD [ 'empty' ] ( x [ k ] ) ) i = Math . max ( k , i ) ; } return i ; }
Gets the degree of the actual polynomial

@param {Object} x
@returns {number}
Gets the degree of the actual polynomial