mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-05 10:01:24 +01:00
refactored, renamed to getGeozone
This commit is contained in:
parent
db9dc9eeed
commit
ea9cb6cf4f
4 changed files with 19 additions and 18 deletions
|
|
@ -138,18 +138,6 @@ function getCoordinates(x, y, decimals = 2) {
|
|||
return [getLongitude(x, decimals), getLatitude(y, decimals)];
|
||||
}
|
||||
|
||||
function getLatitudeDescription(latitude) {
|
||||
const equatorMargin = 1; // 1 degree margin around the equator
|
||||
|
||||
if (Math.abs(latitude) <= equatorMargin) return "Equator";
|
||||
if (latitude > equatorMargin && latitude <= 23.5) return "Tropical North";
|
||||
if (latitude > 23.5 && latitude <= 66.5) return "Temperate North";
|
||||
if (latitude > 66.5) return "Arctic";
|
||||
if (latitude < -equatorMargin && latitude >= -23.5) return "Tropical South";
|
||||
if (latitude < -23.5 && latitude >= -66.5) return "Temperate South";
|
||||
if (latitude < -66.5) return "Antarctic";
|
||||
}
|
||||
|
||||
// prompt replacer (prompt does not work in Electron)
|
||||
void (function () {
|
||||
const prompt = document.getElementById("prompt");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue