C 
C 
C                   FIRST PRINTING, FEBRUARY 1974
C 
C THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
C CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
C AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
C DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
C SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
C DOCUMENT.
C 
C THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
C NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
C A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
C INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
C USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
C VIDED IN WRITING BY DIGITAL.
C 
C DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
C FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
C MENT THAT IS NOT SUPPLIED BY DIGITAL.
C 
C COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
C 
C 
C	ROTATE
C COPYRIGHT 1972, 1973, DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 01754
C
	SUBROUTINE ROTATE(ISTR,IA,IB,IC,X,Y,Z,SINA,CSA)
	DIMENSION X(1),Y(1),Z(1)
	SINB=SINA
	SINC=SINA
	CSB=CSA
	CSC=CSA
	IF(IA)50,50,51
51	DO 30 MO=1,ISTR
	YA=Y(MO)
	XA=X(MO)
	Y(MO)=CSA*YA-SINA*XA
	X(MO)=SINA*YA+XA*CSA
30	CONTINUE
50	IF(IB)60,60,61
61	DO 32 MO=1,ISTR
	XB=X(MO)
	ZB=Z(MO)
	Z(MO)=ZB*CSB-XB*SINB
	X(MO)=XB*CSB+ZB*SINB
32	CONTINUE
60	IF(IC)100,100,71
71	DO 34 MO=1,ISTR
	YC=Y(MO)
	ZC=Z(MO)
	Z(MO)=ZC*CSC+YC*SINC
	Y(MO)=YC*CSC-ZC*SINC
34	CONTINUE
100	RETURN
	END
