MODULE Const
   REAL, PARAMETER :: Degree180 = 180.0
   REAL, PARAMETER :: Pi = 3.141592
   REAL, PARAMETER :: R_to_D = Degree180 / Pi
   REAL, PARAMETER :: D_to_R = Pi / Degree180
END MODULE Const

   REAL FUNCTION RadianToDegree( Radian )
      USE CONST
      IMPLICIT NONE
      REAL, INTENT(IN) :: Radian
      RadianToDegree = Radian * R_to_D
   END FUNCTION RadianToDegree

   REAL FUNCTION DegreeToRadian( Degree )
      USE Const
      IMPLICIT NONE
      REAL, INTENT(IN) :: Degree
      DegreeToRadian = Degree * D_to_R
   END FUNCTION DegreeToRadian

   REAL FUNCTION MySin( x )
      IMPLICIT NONE

      INTERFACE
         REAL FUNCTION DegreeToRadian( x )
            REAL, INTENT(IN) :: x
         END FUNCTION DegreeToRadian
      END INTERFACE

      REAL, INTENT(IN) :: x
      MySin = SIN( DegreeToRadian(x) )
   END FUNCTION MySin

   REAL FUNCTION MyCos( x )
      IMPLICIT NONE

      INTERFACE
         REAL FUNCTION DegreeToRadian( x )
            REAL, INTENT(IN) :: x
         END FUNCTION DegreeToRadian
      END INTERFACE

      REAL, INTENT(IN) :: x
      MyCos = COS( DegreeToRadian(x) )
   END FUNCTION MyCos

