aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/lz/alimr.x
blob: 6845f36ca8bf7b006d101da12ee41507d66890c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# ALIM -- Compute the limits (minimum and maximum values) of a vector.

procedure alimr (a, npix, minval, maxval)

real	a[ARB], minval, maxval, value
int	npix, i

begin
	minval = a[1]
	maxval = a[1]

	do i = 1, npix {
	    value = a[i]
		if (value < minval)
		    minval = value
		else if (value > maxval)
		    maxval = value
	}
end