Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : CVPOLR.FOR

 
Output of file : CVPOLR.FOR contained in archive : FORTRN77.ZIP
SUBROUTINE CVPOLR(X,Y,R,ANG,IFLAG)
C
C SUBROUTINE TO CONVERT POLAR COORDINATES TO RECTANGULAR
C COORDINATES OR RECTANGULAR COORDINATES TO POLAR
C COORDINATES.
C
IF (IFLAG.LT.1.OR.IFLAG.GT.2) GOTO 10
IF (IFLAG.EQ.2) GO TO 5
R = SQRT((X*X) + (Y*Y))
ANG = ATAN2(Y,X)
RETURN
5 X = R*COS(ANG)
Y = R*SIN(ANG)
10 RETURN
C ERROR RETURN
IFLAG = -99
RETURN
END


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : CVPOLR.FOR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/