ArcMapAddinDistanceAndDirection.ViewModels.LinesViewModel.UpdateAzimuthFromTo C# (CSharp) Метод

UpdateAzimuthFromTo() приватный Метод

private UpdateAzimuthFromTo ( AzimuthTypes fromType, AzimuthTypes toType ) : void
fromType AzimuthTypes
toType AzimuthTypes
Результат void
        private void UpdateAzimuthFromTo(AzimuthTypes fromType, AzimuthTypes toType)
        {
            try
            {
                double angle = Azimuth.GetValueOrDefault();

                if (fromType == AzimuthTypes.Degrees && toType == AzimuthTypes.Mils)
                    angle *= 17.777777778;
                else if (fromType == AzimuthTypes.Mils && toType == AzimuthTypes.Degrees)
                    angle *= 0.05625;

                Azimuth = angle;
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex);
            }
        }