power method

  1. @override
DynamicNumber power(
  1. DynamicNumber exponent
)
override

This number to the power of exponent.

It redirects to powerAsDynamicInt or powerAsDecimal depending of the exponent type and value.

Implementation

@override
DynamicNumber<dynamic> power(DynamicNumber<dynamic> exponent) {
  if (exponent.isDecimal) {
    return toDecimal().power(exponent.toDecimal());
  } else {
    return _powerDynamicIntImpl(exponent.toDynamicInt());
  }
}