mul method

Polynomial<T> mul(
  1. Object other, {
  2. DataType<T>? dataType,
  3. PolynomialFormat? format,
  4. bool? fftMultiply,
})

Multiplies this Polynomial with other.

Implementation

Polynomial<T> mul(
  /* Polynomial<T>|T */ Object other, {
  DataType<T>? dataType,
  PolynomialFormat? format,
  bool? fftMultiply,
}) {
  if (other is Polynomial<T>) {
    return mulPolynomial(other,
        dataType: dataType, format: format, fftMultiply: fftMultiply);
  } else if (other is T) {
    return mulScalar(other as T, dataType: dataType, format: format);
  } else {
    throw ArgumentError.value(other, 'other', 'Invalid multiplication.');
  }
}