multiplyScalar method

UGfPoly multiplyScalar(
  1. int scalar
)

Implementation

UGfPoly multiplyScalar(int scalar) {
  if (scalar == 0) return UGfPoly(field, Int32List.fromList(<int>[0]));
  if (scalar == 1) return this;
  final Int32List product = Int32List(_coefficients.length);
  for (int i = 0; i < _coefficients.length; i++) {
    product[i] = field.multiply(_coefficients[i], scalar);
  }
  return UGfPoly(field, product);
}