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

# AHIV -- Compute the high value (maximum) of a vector.

char procedure ahivc (a, npix)

char	a[ARB]
int	npix
char	high, pixval
int	i

begin
	high = a[1]

	do i = 1, npix {
	    pixval = a[i]
	    if (pixval > high)
		high = pixval
	}

	return (high)
end