11 lines
243 B
C
11 lines
243 B
C
#ifndef EUCLIDEAN_DISTANCE_H
|
|
#define EUCLIDEAN_DISTANCE_H
|
|
|
|
#include <math.h>
|
|
|
|
static double calc_euclidean(double coord_1[2], double coord_2[2]) {
|
|
return sqrt(pow((coord_1[0] - coord_2[0]),2) + pow((coord_1[1] - coord_2[1]),2));
|
|
}
|
|
|
|
#endif
|