[This is preliminary documentation and is subject to change.]
Converts the specified value from meters per second to kilometers per hour and rounds the result.
Namespace: Rage
Assembly: RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax
public static int ConvertMetersPerSecondToKilometersPerHourRounded( float metersPerSecond )
Parameters
- metersPerSecond
- Type: SystemSingle
The value, in meters per second.
Return Value
Type: Int32A Single representing the value in kilometers per hour.
Examples
The following example converts 13.8889 m/s to km/h, rounded, and shows it in a notification.
int kilometersPerHourRounded = MathHelper.ConvertMetersPerSecondToKilometersPerHourRounded(13.8889f); Game.DisplayNotification("13.8889 m/s is ~" + kilometersPerHourRounded.ToString() + " km/h.");
See Also