From d54fe7c1f704a63824c5bfa0ece65245572e9b27 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 4 Mar 2015 21:21:30 -0500 Subject: Initial commit --- src/slalib/ranorm.f | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/slalib/ranorm.f (limited to 'src/slalib/ranorm.f') 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 -- cgit