public static string ToMphPreciseString(SpeedValue speed) { return(FloatUtil.IsZero(speed.GameUnits) ? Translation.GetString("Speed_limit_unlimited") : speed.ToMphPrecise().ToString()); }
/// <summary>Format string to display under the speed limit button with miles per hour.</summary> /// <param name="speed">The speed.</param> /// <returns>The string formatted with miles: MM MPH.</returns> private static string ToMphPreciseString(SpeedValue speed) { return(FloatUtil.IsZero(speed.GameUnits) ? Translation.SpeedLimits.Get("Unlimited") : speed.ToMphPrecise().ToString()); }