Skip to content

Commit 606efc5

Browse files
docs: make clear that latitude is first on nearbyGPSCoordinate (#864)
1 parent 9b0d100 commit 606efc5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/address.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ function kilometersToMiles(miles: number): number {
3636
* @param isMetric Metric: true, Miles: false.
3737
*/
3838
function coordinateWithOffset(
39-
coordinate: [number, number],
39+
coordinate: [latitude: number, longitude: number],
4040
bearing: number,
4141
distance: number,
4242
isMetric: boolean
43-
): number[] {
43+
): [latitude: number, longitude: number] {
4444
const R = 6378.137; // Radius of the Earth (http://nssdc.gsfc.nasa.gov/planetary/factsheet/earthfact.html)
4545
const d = isMetric ? distance : kilometersToMiles(distance); // Distance in km
4646

@@ -492,10 +492,10 @@ export class Address {
492492
*/
493493
// TODO ST-DDT 2022-02-10: Allow coordinate parameter to be [string, string].
494494
nearbyGPSCoordinate(
495-
coordinate?: [number, number],
495+
coordinate?: [latitude: number, longitude: number],
496496
radius?: number,
497497
isMetric?: boolean
498-
): [string, string] {
498+
): [latitude: string, longitude: string] {
499499
// If there is no coordinate, the best we can do is return a random GPS coordinate.
500500
if (coordinate === undefined) {
501501
return [this.latitude(), this.longitude()];

0 commit comments

Comments
 (0)