isPowerOf method

bool isPowerOf(
  1. num factor
)

Returns true if this is a valid power of factor.

Implementation

bool isPowerOf(num factor) {
  final root = this.root(factor);
  return root > 0.0 && root.isValidInteger;
}