C/

C/COPYRIGHT (C) 1975

C/DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

C/

C/THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

C/ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH

C/THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

C/SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-

C/VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

C/EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO

C/THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

C/SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

C/

C/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

C/WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-

C/MITMENT BY DIGITAL EQUIPMENT CORPORATION.

C/

C/DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

C/OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

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
