toUnit method
Implementation
double toUnit(BinaryPrefix to, [BinaryPrefix from = BinaryPrefix.none]) {
if (from == to) return toDouble();
final withoutPrefix = from.factor.toDouble() * this;
return withoutPrefix / to.factor.toDouble();
}
double toUnit(BinaryPrefix to, [BinaryPrefix from = BinaryPrefix.none]) {
if (from == to) return toDouble();
final withoutPrefix = from.factor.toDouble() * this;
return withoutPrefix / to.factor.toDouble();
}