public LaneSpeedLimit(uint laneId, SpeedValue speed) { this.laneId = laneId; this.speedLimit = speed.ToKmphPrecise().Kmph; }
public static string ToKmphPreciseString(SpeedValue speed) { return(FloatUtil.IsZero(speed.GameUnits) ? Translation.GetString("Speed_limit_unlimited") : speed.ToKmphPrecise().ToString()); }
/// <summary>Format string to display under the speed limit button with km/hour.</summary> /// <param name="speed">The speed.</param> /// <returns>The string formatted formatted with km: NN km/h.</returns> private static string ToKmphPreciseString(SpeedValue speed) { return(FloatUtil.IsZero(speed.GameUnits) ? Translation.SpeedLimits.Get("Unlimited") : speed.ToKmphPrecise().ToIntegerString()); }