Skip to content

add description #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Navigation/Haversine.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/*
Calculate the distance between two coordinates using the haversine formula
More about: https://pt.wikipedia.org/wiki/F%C3%B3rmula_de_Haversine
@Param {number} latitude1
@Param {number} latitude2
@Param {number} longitude1
@Param {number} longitude2
/**
* @function HaversineDistance
* @description Calculate the distance between two coordinates using the haversine formula
* @param {Integer} latitude1 - The input integer
* @param {Integer} latitude2 - The input integer
* @param {Integer} longitude1 - The input integer
* @param {Integer} longitude2 - The input integer
* @return {Integer} Haversine Distance.
* @see [Haversine_Distance](https://pt.wikipedia.org/wiki/F%C3%B3rmula_de_Haversine)
*/
const haversineDistance = (latitude1 = 0, longitude1 = 0, latitude2 = 0, longitude2 = 0) => {
validateLatOrLong(latitude1)
Expand Down