AngleTypeFormat Method |
Namespace: KSPDev.GUIUtils.TypeFormatters
public static string Format( double value, string format = null )
Debug.Log(AngleType.Format(0.4)); // Prints: "0.4°" Debug.Log(AngleType.Format(0.41)); // Prints: "0.41°" Debug.Log(AngleType.Format(1.0)); // Prints: "1°" Debug.Log(AngleType.Format(1.41)); // Prints: "1.4°" Debug.Log(AngleType.Format(12.555)); // Prints: "13°"
Debug.Log(AngleType.Format(1234.5678, format: "0.0000")); // Prints: "1234.5678°" Debug.Log(AngleType.Format(1234.5678, format: "0.00")); // Prints: "1234.57°"