GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
rst/interp_float/distance.c
Go to the documentation of this file.
1
2
/*-
3
* Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1993
4
* US Army Construction Engineering Research Lab
5
* Copyright 1993, H. Mitasova (University of Illinois),
6
* I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)
7
*
8
* modified by McCauley in August 1995
9
* modified by Mitasova in August 1995
10
*
11
*/
12
13
#include <stdio.h>
14
#include <math.h>
15
#include <unistd.h>
16
#include <
grass/gis.h
>
17
#include <grass/interpf.h>
18
19
double
IL_dist_square
(
double
*pt1,
double
*pt2,
int
dim)
20
{
21
int
i;
22
double
sum = 0, s;
23
24
for
(i = 0; i < dim; i++) {
25
s = pt1[i] - pt2[i];
26
sum += s * s;
27
}
28
return
sum;
29
}
gis.h
IL_dist_square
double IL_dist_square(double *pt1, double *pt2, int dim)
Definition:
rst/interp_float/distance.c:19
lib
rst
interp_float
distance.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13