diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-04 21:21:30 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-04 21:21:30 -0500 |
commit | d54fe7c1f704a63824c5bfa0ece65245572e9b27 (patch) | |
tree | afc52015ffc2c74e0266653eecef1c8ef8ba5d91 /src/slalib/ranorm.f | |
download | calfuse-d54fe7c1f704a63824c5bfa0ece65245572e9b27.tar.gz |
Initial commit
Diffstat (limited to 'src/slalib/ranorm.f')
-rw-r--r-- | src/slalib/ranorm.f | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/slalib/ranorm.f b/src/slalib/ranorm.f new file mode 100644 index 0000000..c2e32a5 --- /dev/null +++ b/src/slalib/ranorm.f @@ -0,0 +1,31 @@ + REAL FUNCTION sla_RANORM (ANGLE) +*+ +* - - - - - - - +* R A N O R M +* - - - - - - - +* +* Normalize angle into range 0-2 pi (single precision) +* +* Given: +* ANGLE dp the angle in radians +* +* The result is ANGLE expressed in the range 0-2 pi (single +* precision). +* +* P.T.Wallace Starlink 23 November 1995 +* +* Copyright (C) 1995 Rutherford Appleton Laboratory +*- + + IMPLICIT NONE + + REAL ANGLE + + REAL A2PI + PARAMETER (A2PI=6.283185307179586476925287) + + + sla_RANORM=MOD(ANGLE,A2PI) + IF (sla_RANORM.LT.0.0) sla_RANORM=sla_RANORM+A2PI + + END |