aboutsummaryrefslogtreecommitdiff
path: root/sys/vops/lz/amaxkx.x
blob: 9c3212eb21a790d98bd553e7a7e9ef4083be750f (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.

# AMAXK -- Compute the maximum of a constant and a vector (generic).

procedure amaxkx (a, b, c, npix)

complex	a[ARB]
complex	b
complex	c[ARB]
int	npix, i
real	abs_b

begin
	abs_b = abs (b)

	do i = 1, npix
		if (abs(a[i]) >= abs_b)
		    c[i] = a[i]
		else
		    c[i] = b
end