MightyLittleGeodesy.Positions.WGS84Position.ConvToDmString C# (CSharp) Method

ConvToDmString() private method

private ConvToDmString ( double value, Char positiveValue, Char negativeValue ) : string
value double
positiveValue Char
negativeValue Char
return string
        private string ConvToDmString(double value, Char positiveValue, Char negativeValue)
        {
            if (value == double.MinValue)
            {
                return "";
            }

            var degrees = Math.Floor(Math.Abs(value));
            var minutes = (Math.Abs(value) - degrees) * 60;

            return string.Format(
                "{0} {1}ยบ {2}'",
                value >= 0 ? positiveValue : negativeValue,
                degrees,
                (Math.Floor(minutes * 10000) / 10000).ToString(CultureInfo.InvariantCulture));
        }