conversions library
Conversions
When you do things that need units, sometimes you need to switch between them.
Using
import 'package:geodart/conversions.dart';
// Convert distances
convertDistance(20, DistanceUnits.nauticalMiles, DistanceUnits.feet); // returns 121522
// Convert areas
convertArea(20, AreaUnits.hectares, AreaUnits.squareMeters); // returns 200000
// Convert angles
convertAngle(20, AngleUnits.degrees, AngleUnits.radians); // returns 0.349079173398
Classes
- AngleUnit
- A class to define units of angle
- AngleUnits
- A helper class to make units of angle more accessible
- AreaUnit
- A class to define units of area
- AreaUnits
- A helper class to make units of area more accessible
- DistanceUnit
- A class to define units
- DistanceUnits
- A helper class to make units more accessible
Functions
-
convertAngle(
double original, AngleUnit from, AngleUnit to) → double -
Convert
original
anglefrom
some unitto
another. -
convertArea(
double original, AreaUnit from, AreaUnit to) → double -
Convert
original
areafrom
some unitto
another. -
convertDistance(
double original, DistanceUnit from, DistanceUnit to) → double -
Convert
original
distancefrom
some unitto
another.