convertAngle function
Convert original angle from some unit to another.
Example:
convertAngle(100, AngleUnits.degrees, AngleUnits.radians) // returns: 0.017453292519943295
Implementation
double convertAngle(double original, AngleUnit from, AngleUnit to) {
return original * to.radianRatio / from.radianRatio;
}