lib/checks/canRearrangeCoefficient.js
// and polynomial without a coefficient.
and polynomial without a coefficient.
and polynomial without a coefficient .
function canRearrangeCoefficient(node) {
  if (node.op !== '*' || node.implicit) {
    return false;
  }
  if (node.args.length !== 2) {
    return false;
  }
  if (!Node.Type.isConstantOrConstantFraction(node.args[1])) {
    return false;
  }
  if (!Node.PolynomialTerm.isPolynomialTerm(node.args[0])) {
    return false;
  }
  const polyNode = new Node.PolynomialTerm(node.args[0]);
  return !polyNode.hasCoeff();
}
function canRearrangeCoefficient ( node ) { if ( node . op !== '*' || node . implicit ) { return false ; } if ( node . args . length !== 2 ) { return false ; } if ( ! Node . Type . isConstantOrConstantFraction ( node . args [ 1 ] ) ) { return false ; } if ( ! Node . PolynomialTerm . isPolynomialTerm ( node . args [ 0 ] ) ) { return false ; } const polyNode = new Node . PolynomialTerm ( node . args [ 0 ] ) ; return ! polyNode . hasCoeff ( ) ; }
and polynomial without a coefficient.
and polynomial without a coefficient .
// implicit multiplication doesn't count as multiplication here, since it // represents a single term.