diff --git a/src/Logic/GeoOperations.ts b/src/Logic/GeoOperations.ts index 854b57fb2..09f50154f 100644 --- a/src/Logic/GeoOperations.ts +++ b/src/Logic/GeoOperations.ts @@ -10,12 +10,12 @@ import { MultiPolygon, Point, Polygon, - Position, + Position } from "geojson" import { Tiles } from "../Models/TileRange" import { Utils } from "../Utils" -;("use strict") +("use strict") export class GeoOperations { private static readonly _earthRadius: number = 6378137 @@ -1051,6 +1051,8 @@ export class GeoOperations { } /** + * Converts various types of possible bearings into degrees, with 0 being north, 90 being east. + * * GeoOperations.parseBearing("N") // => 0 * GeoOperations.parseBearing("E") // => 90 * GeoOperations.parseBearing("NE") // => 45 @@ -1064,7 +1066,7 @@ export class GeoOperations { * GeoOperations.parseBearing(-270) // => 90 * */ - public static parseBearing(str: string | number) { + public static parseBearing(str: string | number): number { let n: number if (typeof str === "string") { str = str.trim()