Viewing contents of file '../idllib/uit/pro/cdrot.pro'
pro cdrot,cd,newcd,angle
;+
; NAME:
;    CDROT
; PURPOSE:
;    Rotates matrix by an angle.
; CALLING SEQUENCE:
;    cdrot, cd, newcd, angle
; INPUT PARAMETERS:
;    cd = input matrix (usually astrometric CD's)
;    angle - angle by which to rotate CD matrix, scalar
; OUTPUT PARAMETERS:
;    newcd = output matrix (usually astrometric CD's)
; COMMON BLOCKS:
;    none
; PROCEDURE:
;    Computes rotation matrix from trig functions, multiplies.
; MODIFICATION HISTORY:
;    Written by J. K. Hill, STX
;    Double precision.  RSH, HSTX, 18 Feb 93.
;-
    cdr=!dpi/180.0d0
    theta = angle*cdr
    rot_mat = [ [ cos(theta), sin(theta)], $   ;Rotation matrix
                [-sin(theta), cos(theta)] ] 
    newcd = cd#rot_mat
;
return
end