public static string ToStringDecimal(double latitude, double longitude, bool newline = false, int precision = 3) { double clampedLongitude = MuUtils.ClampDegrees180(longitude); double latitudeAbs = Math.Abs(latitude); double longitudeAbs = Math.Abs(clampedLongitude); return(latitudeAbs.ToString("F" + precision) + "° " + (latitude > 0 ? "N" : "S") + (newline ? "\n" : ", ") + longitudeAbs.ToString("F" + precision) + "° " + (clampedLongitude > 0 ? "E" : "W")); }
public EditableAngle(double angle) { angle = MuUtils.ClampDegrees180(angle); negative = (angle < 0); angle = Math.Abs(angle); degrees = (int)angle; angle -= degrees; minutes = (int)(60 * angle); angle -= minutes / 60; seconds = Math.Round(3600 * angle); }
public string ToString(string format) { return(MuUtils.PrettyPrint(value, format)); }