aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/lz/aliml.x
blob: abbad1c5058187e6a2b0ce891735edfe6956b442 (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 aliml (a, npix, minval, maxval)

long	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