private double GetAngularDistanceFromTo(AngularTypes fromType, AngularTypes toType, double input)
{
double angularDistance = input;
try
{
if (fromType == AngularTypes.DEGREES && toType == AngularTypes.GRADS)
angularDistance *= 1.11111;
else if (fromType == AngularTypes.DEGREES && toType == AngularTypes.MILS)
angularDistance *= 17.777777777778;
else if (fromType == AngularTypes.GRADS && toType == AngularTypes.DEGREES)
angularDistance /= 1.11111;
else if (fromType == AngularTypes.GRADS && toType == AngularTypes.MILS)
angularDistance *= 16;
else if (fromType == AngularTypes.MILS && toType == AngularTypes.DEGREES)
angularDistance /= 17.777777777778;
else if (fromType == AngularTypes.MILS && toType == AngularTypes.GRADS)
angularDistance /= 16;
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
return angularDistance;
}