convertArea function
Convert original
area from
some unit to
another.
Example:
convertArea(100, AreaUnits.hectares, AreaUnits.squareMeters) // returns: 10000
Implementation
double convertArea(
double original,
AreaUnit from,
AreaUnit to,
) {
return original * to.squareMeterRatio / from.squareMeterRatio;
}