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

# AMIN -- Compute the minimum of two vectors (generic).

procedure amin$t (a, b, c, npix)

PIXEL	a[ARB], b[ARB], c[ARB]
int	npix, i

begin
	do i = 1, npix
	    $if (datatype == x)
		if (abs(a[i]) <= abs(b[i]))
		    c[i] = a[i]
		else
		    c[i] = b[i]
	    $else
		c[i] = min (a[i], b[i])
	    $endif
end