diff options
Diffstat (limited to 'sys/vops/ak/ahivx.x')
-rw-r--r-- | sys/vops/ak/ahivx.x | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/vops/ak/ahivx.x b/sys/vops/ak/ahivx.x new file mode 100644 index 00000000..b487aa8d --- /dev/null +++ b/sys/vops/ak/ahivx.x @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# AHIV -- Compute the high value (maximum) of a vector. + +complex procedure ahivx (a, npix) + +complex a[ARB] +int npix +complex high, pixval +real abs_high +int i + +begin + high = a[1] + abs_high = abs (high) + + do i = 1, npix { + pixval = a[i] + if (abs (pixval) > abs_high) { + high = pixval + abs_high = abs (high) + } + } + + return (high) +end |