root method
Returns the root of this
factored by factor
.
Note: The calculated value is multipled by 1000000000
, rounded,
and divided by 1000000000
to account for rounding errors.
Implementation
double root(num factor) =>
(math.pow(this, 1 / factor) * 1000000000).round() / 1000000000;