mulScalar method

Polynomial<T> mulScalar(
  1. T other, {
  2. DataType<T>? dataType,
  3. PolynomialFormat? format,
})

Multiplies this Polynomial with a scalar.

Implementation

Polynomial<T> mulScalar(T other,
    {DataType<T>? dataType, PolynomialFormat? format}) {
  final result = createPolynomial<T>(this, degree, dataType, format);
  final mul = result.dataType.field.mul;
  unaryOperator<T>(result, this, (a) => mul(a, other));
  return result;
}