diff options
| author | Efstathios Ntonas <[email protected]> | 2022-04-22 14:57:05 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-22 11:57:05 +0000 |
| commit | 606efc55de7aa84931879ac0e4ed5887b91b3826 (patch) | |
| tree | ef00eb86a6f6cb5c6c08cf9c517041c073fe6ff2 /src | |
| parent | 9b0d1009134d0f0364b0a4851e03fd5e0af145f9 (diff) | |
| download | faker-606efc55de7aa84931879ac0e4ed5887b91b3826.tar.xz faker-606efc55de7aa84931879ac0e4ed5887b91b3826.zip | |
docs: make clear that latitude is first on nearbyGPSCoordinate (#864)
Diffstat (limited to 'src')
| -rw-r--r-- | src/address.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/address.ts b/src/address.ts index e0fb6bf2..e1518a46 100644 --- a/src/address.ts +++ b/src/address.ts @@ -36,11 +36,11 @@ function kilometersToMiles(miles: number): number { * @param isMetric Metric: true, Miles: false. */ function coordinateWithOffset( - coordinate: [number, number], + coordinate: [latitude: number, longitude: number], bearing: number, distance: number, isMetric: boolean -): number[] { +): [latitude: number, longitude: number] { const R = 6378.137; // Radius of the Earth (http://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html) const d = isMetric ? distance : kilometersToMiles(distance); // Distance in km @@ -492,10 +492,10 @@ export class Address { */ // TODO ST-DDT 2022-02-10: Allow coordinate parameter to be [string, string]. nearbyGPSCoordinate( - coordinate?: [number, number], + coordinate?: [latitude: number, longitude: number], radius?: number, isMetric?: boolean - ): [string, string] { + ): [latitude: string, longitude: string] { // If there is no coordinate, the best we can do is return a random GPS coordinate. if (coordinate === undefined) { return [this.latitude(), this.longitude()]; |
