aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/ak/ahivr.x
blob: 0485e6bfabefec8870d9b79e6491b4afc33011c2 (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.

real procedure ahivr (a, npix)

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

begin
	high = a[1]

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

	return (high)
end