mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Nautical mile option in Units-Editor (#1059)
* Nautical mile option in Units-Editor In Distance --> Distance Unit. * adding nautical league The distance 5.556 km = 1 league, is put on the nautical league and used the English land league 4.828 to differentiate both units. * Update versioning.js changed 1.97.02 to 1.97.03 * fix in versioning and index.html * writing ver 1.97.03 in hopes of fixing the version conflict * increasing ver 1.97.05 to fix --------- Co-authored-by: Azgaar <maxganiev@yandex.com>
This commit is contained in:
parent
af927ed345
commit
73e9d222ae
3 changed files with 9 additions and 5 deletions
|
|
@ -113,9 +113,11 @@ function editWorld() {
|
|||
|
||||
function toKilometer(v) {
|
||||
if (unit === "km") return v;
|
||||
else if (unit === "mi") return v * 1.60934;
|
||||
else if (unit === "lg") return v * 5.556;
|
||||
else if (unit === "vr") return v * 1.0668;
|
||||
if (unit === "mi") return v * 1.60934;
|
||||
if (unit === "lg") return v * 4.828;
|
||||
if (unit === "vr") return v * 1.0668;
|
||||
if (unit === "nmi") return v * 1.852;
|
||||
if (unit === "nlg") return v * 5.556;
|
||||
return 0; // 0 if distanceUnitInput is a custom unit
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue