aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/stxtools/sp_util/spdise.x
blob: 9985c7907b8772c68c8cb055997e50c9cb42909d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# sp_distanced - Determine the distance between two points.
#
# History
#   4Dec90 - Created by Jonathan D. Eisenhamer, STScI.
#---------------------------------------------------------------------------

double procedure sp_distanced( x1, y1, x2, y2 )

double x1, y1, x2, y2

double a, b

begin

  a = x1 - x2
  b = y1 - y2
  return( sqrt( ( a * a ) + ( b * b ) ) )

end
#---------------------------------------------------------------------------
# End of sp_distanced
#---------------------------------------------------------------------------
# sp_distancer - Determine the distance between two points.
#
# History
#   4Dec90 - Created by Jonathan D. Eisenhamer, STScI.
#---------------------------------------------------------------------------

real procedure sp_distancer( x1, y1, x2, y2 )

real x1, y1, x2, y2

real a, b

begin

  a = x1 - x2
  b = y1 - y2
  return( sqrt( ( a * a ) + ( b * b ) ) )

end
#---------------------------------------------------------------------------
# End of sp_distancer
#---------------------------------------------------------------------------