pow method

Unit<Dimension> pow(
  1. int p
)

Returns this unit raised to p.

Implementation

Unit pow(int p) {
  if (p == 1) return this;
  return Unit(
    dim.pow(p),
    UnitSymbol.parse(symbol).pow(p).toString(),
    name: '$name^$p',
    converter: converter.pow(p),
  );
}