Skip to content

Commit d46e467

Browse files
authored
Update Coordinate.js
Style compliance.
1 parent 3788dfc commit d46e467

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Maths/Coordinate.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/*
22
Calculate the mathematical properties involving coordinates
3-
43
Calculate the Distance Between 2 Points on a 2 Dimensional Plane
54
Example: coorDistance(2,2,14,11) will return 15
65
Wikipedia reference: https://en.wikipedia.org/wiki/Geographical_distance#Flat-surface_formulae
76
*/
87
const distance2points = (longitude1, latitude1, longitude2, latitude2) => {
9-
const width = longitude2 - longitude1;
10-
const height = latitude2 - latitude1;
11-
return (Math.sqrt(width * width + height * height));
12-
};
8+
const width = longitude2 - longitude1
9+
const height = latitude2 - latitude1
10+
return (Math.sqrt(width * width + height * height))
11+
}
1312

14-
export { distance2points };
13+
export { distance2points }

0 commit comments

Comments
 (0)