blob: 0e0f8056dfd3f36776487a767b4c9eb9a8a3c81f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
# ARCP -- Reciprocal of a constant divided by a vector. No divide by zero
# checking is performed.
procedure arcps (a, b, c, npix)
short a # constant numerator
short b[ARB] # vector denominator
short c[ARB] # output vector
int npix
int i
begin
if (a == 0) {
call aclrs (c, npix)
} else if (a == 1) {
do i = 1, npix
c[i] = 1 / b[i]
} else {
do i = 1, npix
c[i] = a / b[i]
}
end
|