This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:core:funref:ms_to_kmh [2019-10-02 15:40] 82.67.173.193 created |
dev:core:funref:ms_to_kmh [2020-01-22 09:53] (current) admin ↷ Page moved from reference:advtrains:ms_to_kmh to dev:core:funref:ms_to_kmh |
||
---|---|---|---|
Line 13: | Line 13: | ||
===== Returns ===== | ===== Returns ===== | ||
- | A speed unit in **kilometers per hour**. | + | The corresponding |
+ | |||
+ | ===== Calculation ===== | ||
+ | < | ||
+ | 1/1000 km | ||
+ | 1 m/s = --------- = ---- km/h = 3.6 km/h | ||
+ | 1/3600 h 1000 | ||
+ | </ | ||
===== Examples ===== | ===== Examples ===== | ||
Line 28: | Line 35: | ||
<file lua ms_to_kmh.lua> | <file lua ms_to_kmh.lua> | ||
function advtrains.ms_to_kmh(speed) | function advtrains.ms_to_kmh(speed) | ||
- | return speed * 3.6 | + | |
end | end | ||
</ | </ |